Usage of Jsonpath filters when updating variables

Within Cloud CX I have a data action while returns a simple JSON back that is stored into a Json variable. Later on in the flow I'm then trying to use the Update Data element with an expression that parses the Json and fetches/stores a particular value from within into another variable. Within the expression I'm trying to use a filter like Task.MyVar.PersonList[?(@.LastName=="Jones")].City however any usage of the ?() syntax in my jsonpath seems to throw an error. Any ideas on how to overcome without looping through the complete json document with an incrementing counter until I find a match?

Sample Json doc that is stored in Task.MyVar:

{
    "PersonList": [
	{
	"LastName": "Jones",
	"FirstName": "Jack",
	"City": "Anyhwere",
	"State": "AL"
	},
        {
        "LastName": "Smith",
        "FirstName": "Sam",
        "City": "MyTown",
        "State": "TX"
        }
    ]
}

Thanks for any input!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.