I get this response in my API FLOW:
{"prod":["ABC","XYZ"],"seqno":[1,2],"price":[61.7047,56.1235]}
Is there a way to have this format instead:
{ "seqno": 1, "prod": "ABC", "price": 61.7047, }, { "seqno": 2, "prod": "XYZ", "price": 56.1235, }
you could use a jqtransform step with the filter below. [ .seqno as $seqno | .prod as $prod | .price as $price | range(0; $seqno | length) | {seqno: $seqno[.], prod: $prod[.], price: $price[.]}]
Hi again, Brandon. when I try, I get this (can you help again ) (my response without jqtransform is :
{ "prod": [ "ABC", "DEF" ], "seqno": [ 1, 2 ], "price": [ 61.7047, 56.1235 ]}
no.
You must format Your json.
Sorry Nathalie, I have been at a conference this. Week. I took your JSON response, and the jq filter i put above and got the expected output. What does your JQTransform Parameter look like? Is it the full response from the API step?
Hi Brandon
If I test only the jqtransform, it is ok. If I use postman it is not: here is my flow:
I get this in Postman: