How to iterate a list returned by Consume REST API?

How to iterate a list returned by Consume REST API?

  
Hi,

I tried to use "For Each". But "For Each" requires "Record List". Any ideas?

Thanks
For Each shoud work, did you set the Attribute containing the List?

See this sample, my (REST) Response has the type REST_CORE_GetMeasurements.



So when I want to itterate the result, I have to set it to the Response.Ms



Thanks, Matthias. I didn't realize that.

One additonal question: How to define a structure for output parameter when the REST API return a json array instead of a json object?
 
Cyrus Liu wrote:
Thanks, Matthias. I didn't realize that.

One additonal question: How to define a structure for output parameter when the REST API return a json array instead of a json object?
 
 
I don't get the question, You can paste a example json respone in the REST method editor (response), and then outsystems structures are created automaticly.

Thanks,, Mattias. It solves my problem.