Pergunta - parceiro Support One

27 views
Skip to first unread message

Roberto Varallo

unread,
Mar 15, 2023, 11:06:50 AM3/15/23
to integra
Hi Group,
Hope everybody is ok.
We received some questions from our partner Support One, who is starting to work with Integra.Sky. Find below their comments and questions. Please, any help is welcome.

Support One: We are using SAP Service layer APIs which give a response in the form of JSON, API is using inside a for loop. 1. After Appling for loop what can i do to make the json objects that come at end of the for loop into a single json array ? 2. Can you provide a detailed documentation on how to merge 2 json arrays based on the occurrences of same field with same value just like we merge 2 table details using a common field ?

Thanks in advance.

https://skyone.solutions/

Felipe Laera Ignacio

unread,
Mar 15, 2023, 1:59:45 PM3/15/23
to integra, Roberto Varallo
Hi!

Answering the questions:

1: To insert items in a single array you can create an array-type flow parameter and push the item to it at the end of each iteration. At the end of the loop your parameter will be filled.
2: To merge two arrays based on fields equality you can use Transformation module with an expression like this: https://try.jsonata.org/l4289EC8F=

Felipe Laera Ignacio

unread,
Mar 15, 2023, 2:03:10 PM3/15/23
to integra, Felipe Laera Ignacio, Roberto Varallo
This is the correct link: https://try.jsonata.org/yuHN35weN
Reply all
Reply to author
Forward
0 new messages