Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm using open studio.
Is it possible to include a value from outside the loop?
I tried several options like the full json path but then it grabs all the values and not the corresponding one.
Below is a simple example
[{"id":1,"client_info":{"first_name":"first","last_name":"name","company":"company_name","address":"'streetname 1","city":"test_city","zipcode":"1234 AB","country":"1","email":"test@mail.com","phone":"0123456789"},"items":[{"id":1,"name":"test_name","taxes":[{"id":1}]}]}]
how would i get the corresponding value of id and taxes array id and use them while looping threw client_info.
When i use full jsonpath both id and taxes id are filled with all corresponding values in each loop.
Hopefully someone can point me in the right direction.
Thanks in advance
Hi
JSON Path do not allow to refer by relative path,
but you can parse JSON with XPath
in this case:
"/client_info/" - loop path
columns XPath expression:
"first_name"
last_name"
"../id"
but still not possible to have data from 2 different loops, you will need to extract data for each loop individually and join them after.
regards, Vlad