JSONPath for list in attribute?

Hello Sailors

A web service is returning this data

{
    "Entitlements": [
        {
            "EntitlementID": "001",
            "DisplayName": "727.21.0.15_n1",
        },
        {
            "EntitlementID": "002",
            "DisplayName": "727.21.0.18_n1",
        },
        {
            "EntitlementID": "003",
            "DisplayName": "727.21.0.47b_n1",
        }
    ]
}

If I in my Connector Operations for Group Aggregations sets DisplayName to Entitlements[*].DisplayName, I only get one entitlement with all the DisplayNames as value.

I can set rootPath in xml to Entitlement and then set DisplayName to DisplayName, and then I get all the correct entitlements.

Is this how it is supposed to be, or am I just doing something wrong in my mapping?

I know that Entitlements[*] returns a list, so I understand why I only get one entitlement, but how would I solve this without rootPath?

Best regards
Stefan

Yes, set root path to Entitlement . That is the correct way.

BTW, input is in incorrect json format. There is an additional ,

test it in : Json Path Evaluator | SailPoint Developer Community

Correct Input:
{
“Entitlements”: [
{
“EntitlementID”: “001”,
“DisplayName”: “727.21.0.15_n1”
},
{
“EntitlementID”: “002”,
“DisplayName”: “727.21.0.18_n1”
},
{
“EntitlementID”: “003”,
“DisplayName”: “727.21.0.47b_n1”
}
]
}

JSON query: $.Entitlements[*].DisplayName

Thank you, I was tired and stressed and did not see the Root Path field right in front of me, hence my question about the xml.

The JSON has been anonymized, so that is a copy paste error on my part.

Thank you again for answer, it is all working as expected now :slightly_smiling_face:

Best regards
Stefan