How to become more efficient with Array/Map function

Hi,

I am trying to extract and parse information from incoming emails - Item Name/Quantity/Price

I have got chatgpt to extract the above in JSON format, and have figured out how to access the array and create variables (in order to add them to a spreadsheet).

The main issue is - It feels quite inefficient to manually create a variable for each output in the array. Is there an easier way to get the extracted information into a spreadsheet?


Thank you

Hi,
I would do it the following way:

  1. Here is your json:

  2. You will need an interator, aggregator and I used Google sheets bulk add rows advanced for a test run.

  3. In the iterator you should map the items array from the json:

  4. In the aggregator I mapped the order number and item name, price, qty. Also after you connect your spreadsheet module make sure to set the target structure type:

  5. And in the google spreadsheets module map the aggregated array in the rows:

  6. This is what was pushed to the spreadsheet:

1 Like

Thank you! Will give this a try