Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Nested JSON path does not work. #42

Closed
cbarlow1993 opened this issue Jan 30, 2020 · 3 comments
Closed

Nested JSON path does not work. #42

cbarlow1993 opened this issue Jan 30, 2020 · 3 comments
Assignees

Comments

@cbarlow1993
Copy link

I've been trying to use grant conditions on a context which has a nested Object similar to below.

Context object:

{
    "val": "abc",
    "item": {
        "itemValue": "abc"
    }
}

condition:

    condition: {
        Fn: 'EQUALS',
        args: {
             'val': $item.itemValue
        }
    }

The docs suggest that an JSON path similar to $item.itemValue would work but the context test never works.

Are nested objects in the context supported? Could you provide examples in the tests if they are?

@koladilip
Copy link
Contributor

JSON path convention is incorrect, it should be $.item.itemValue (not $item.itemValue).

condition: {
        Fn: 'EQUALS',
        args: {
             'val': $.item.itemValue
        }
    }

@koladilip koladilip self-assigned this Jan 30, 2020
@koladilip
Copy link
Contributor

Is this fixed?

@cbarlow1993
Copy link
Author

Thanks for you're help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants