Skip to main content

I’ve got Shopify orders with each product as a line item, and each product possibly having additional line items (properties) on each one. An order may look like this:

Previously when I was building and testing using only products with properties, this article helped in getting it working:

I was able to loop through each product and parse out the properties to eventually map with.

However, adding a product without any properties is throwing off the order of how things are parsed.

In the above example, the formatter would only find 2 properties sets instead of 3, meaning the Test eCard properties are attaching to the Test nonCard, and Physical Card properties are attaching to the Test eCard. 

Is there way to assign a null value before the formatting occurs? 

I’ve tried the methods in this thread but the Spreadsheet formula did not work, as it didn’t recognize that it was blank.

 

Hi @RH_Z 

Good question.

The best way I’ve found to handle nested arrays is to use a Code step, which can require an advanced understanding of JSON structure, logic, and data handling.


Thank you @Troy Tessalone, do you happen know of an article or have any sample code that I can work off? Something that would point me in the right direction would be very helpful! Thanks again


@RH_Z 

I usually charge for that advanced level of Code configuration within a Zap.