Hello the Make community
I’ve a problem with flattening a nested data structure without using the Iterator module, in order to minimize the number of operations (and tokens).
My Use Case
I receive an “array of orders”, each containing an array of “tickets”. My goal is to create a “flat array” where each ticket is on its own line, while retaining key information from the parent order.
Example (input):
“id”: 80196362,
“plan”: { “name”: “Expo1” },
“partner”: { “name”: “the experience” },
“tickets”: [
{ “id”: 1, “unitary_price”: 29.9 },
{ “id”: 2, “unitary_price”: 19.9 }
]
In my step post array agregator i get this:
And without flatening the structure, i get a code that works, but return only the first ticket and look like:
Expected (output):
{ “ticket_id”: 1, “ticket_price”: 29.9, “plan_name”: “Expo1”, “partner_name”: “the experience” },
{ “ticket_id”: 2, “ticket_price”: 19.9, “plan_name”: “Expo1”, “partner_name”: “the experience” }
]
I tested multiples things since 2 weeks without success, so a help in this would be really appreciated:)