0
Started

API Node : create loop to set/display variables from each object from JSON result

Vincent DELBEAU 7 years ago updated by Praveen Srinivasaiah (Admin) 7 years ago 3

Hello,


I use a lot of API Nodes to retrieve data from web service and display them through variables.
So the only way I found to do that is to to pre-create variables (id1,id2,idN,name1, name2, nameN, etc.) for each occurence of objects (from the JSON result) that I need to store.


Some day, I will have 3 records, other days maybe 6. And if I had not pre-created enough variables, I will not have all the data.


My question is : is it possible to make a loop function to store (or to display) every occurence of the targeted data from un JSON result?


For ie :


$.data.*.id -> variable


'0' => "689633"

'1' => "689632"

'2' => "689637"

'3' => "689635"'

4' => "689962"

'5' => "689966"


Apparently it's not possible :(


Image 446


PS : your web certificate may have date issue ! (net::ERR_CERT_DATE_INVALID).



+1
Under review

Thanks for this - try it out again and you should be all set!

Thanks for your reply.
I don't get it, I tried again and the result is the same. I'm doing it wrong?

Started

Once all the data are stored in variables, use the GoToNode back to the API.