In Integration Studio I'm having a syntax issue trying to filter a json to extract an element. In the sample json below, abbreviated for simplicity, I need to extract the endDate where the entitlementType=='INITIAL' && serviceLevelCode=='ND'.
I had thought this would work (and tried quite a few other variations): filter(json_parser(response.data,'$.result.entitlements'),'item.entitlementType=="EXTENDED" && item.ServiceLevelCode=="ND"','{"EndDt":item.endDate}',0)
But it does not extract the element. Other, unfiltered elements are coming out fine. What's wrong with my syntax?
Thanks in advance,
Lyn
{
"code": 0,
"originalCode": 200,
"localChannel": "47",
"countryCode":"US",
"result": [
{
"id": 2137399848,
"entitlements": [
{
"itemNumber": "1gj",
"endDate": "2025-07-24T04:59:59.000001Z",
"entitlementType": "INITIAL",
"serviceLevelCode": "ND"
},
{
"itemNumber": "2rb",
"endDate": "2025-07-24T04:59:59.000001Z",
"entitlementType": "INITIAL",
"serviceLevelCode": "RR"
},
{
"itemNumber": "3a",
"endDate": "2028-07-24T04:59:59.000001Z",
"entitlementType": "EXTENDED",
"serviceLevelCode": "ND"
}
]
}
]
}