Original Message:
Sent: 11-19-2025 15:49
From: Jeff Stevens
Subject: GetJsonObjectProperty - working with array of objects
I too seem to be missing something fundamental.
Using @Jason Mathison's JSONPath syntax recommendation(s), Architect only seems to return NOT_SET values. Are there any working examples of actually using GetJsonObjectProperty that returns the selected values as a JSON array?
Note: This resolves fine on the evaluation tool, just not in the flow. Is this an Architect limitation, resolving the pathing syntax, expecting only a single propertyName?
------------------------------
Jeff Stevens
Original Message:
Sent: 05-19-2025 08:29
From: Jason Mathison
Subject: GetJsonObjectProperty - working with array of objects
I typically do my testing with https://www.javainuse.com/jsonpath (disclaimer: neither Genesys nor I have anything to do with this site)
Putting in your example I came up with a few ways to get an array of pet names:
pets..Name
pets[*].Name
$..Name
In my opinion the first two examples are easier to read and less likely to break if additional Name fields are added to the response.
------------------------------
--Jason
Original Message:
Sent: 05-18-2025 18:45
From: Anton Vroon
Subject: GetJsonObjectProperty - working with array of objects
I've been dabbling with JSON paths in architect, the part I become stuck at, and would appreciate some guidance is when I'm working with an array of objects.
I can get that nested array of objects with GetJsonObjectProperty easy enough, but then getting an array from one of the fields withing that object array it all falls apart.
Take something easy like:
{ "name": "bob", "pets": [ { "Type": "cat", "Name": "paws", "age": "4" }, { "Type": "dog", "Name": "tails", "age": "5" } ]}
The output I'm after is an array of pet names
I can get the array of pets with something like GetJsonObjectProperty(Flow.MyPets, "pets") where Flow.MyPets is the above json object.
But then getting just an array of names seems to escape me. I can't just do GetJsonObjectProperty(Flow.petsArray, "Name") or Flow.petsArray.Name etc.
I am missing something fundamental, and basic here, but my brain just isn't processing this, any guidance would be appreciated.
#Architect
------------------------------
Anton Vroon
------------------------------