I’ve seen various ways to extract json data using Get Object and I can get a single Object’s field values, however, I don’t seem to be able to access a nested object’s value or run any debug, I just get undefined.
Here is the JSON where I simply want to extract the second ‘field4’ value which seems to be inside a 3rd nested JSON object in the array.
This JSON Data is actually only 1 Result set not a set of 2 result sets.
{“channel”:{“id”:860888,“name”:“Salt Level Checker”,“description”:“Distance ToF - Salt Level Checker in mm”,“latitude”:“0.0”,“longitude”:“0.0”,“field1”:“Distance”,“field2”:“Charge”,“field3”:“Voltage”,“field4”:“Battery”,“created_at”:“2019-09-09T19:02:32Z”,“updated_at”:“2019-11-04T22:01:26Z”,“last_entry_id”:314},“feeds”:[{“created_at”:“2020-05-03T12:20:48Z”,“entry_id”:314,“field4”:“929”}]}
What I want to get is the last ‘field4’ value which is ‘929’ but I cannot seem to do it with GetObject.
I also can’t tell whether I am retrieving the second created_at entry or the first one.
This is my stab at it that is giving me undefined on the last Get Object for the set ADCValue which I want to set to the field4 value 929:-
I’m pulling back ‘Salt level checker’ for the first set (JSONName) GetObject
I am pulling back ‘battery’ for the second (JSONFieldName) GetObject
I am pulling ‘2019-09-09T19:02:32Z’ from ‘created_at’ in the 3rd (JSONTimeDate) Get Object
I cannot pull field4’s value 929 at the end of the string (in a nested object)
Hi Jared,
I cannot find nestDLstR but did find NestdList - however that one doesn’t have any JSON and getObjects in it. Sorry, am I missing something? I tried searching for nestDLstR too, but no joy.
Oliver
What this JSON appears to have is 2 x Objects and 1x List, but the list is in the second Object so I cannot seem to reference that. I would love to understand how to reference different objects and lists within objects.