Convert object (key-value) to list?

Hi all,

Let's say I'm calling an endpoint which returns me an object similar to the structure below:

And I need to convert it to a list, something like this:

Is there any straight forward way to do this in OutSystems? If possiblle, I'd like to do all the manipulations on server side.

Best regards,

Ricardo Pedroso.

Hi Ricardo,

Yes its possible to convert it in list by using ardoJSON forget component. Below are the steps

1. Use JSON_LIstfy method to convert it in key value pair list by assigning the path.

2. Select the new path of key value pair list.

3. Deserialize the list to key value pair list structure

4. Create your out put JSON structure

5. Loop through above key value pair list and fill the out put JSON structure list

6. Serialize the newly created out put JSON structure.

Attached is the working example. Hope this will help you.

Best Regards



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.