How to combine product attributes into a JSON?

What are you trying to achieve?

hi! I’m getting a lot of help. Thank you for community users!

I have a question now!

please keep this brief, and we hope you enjoy reading and helping out.

arrays
productName : {a,b,c,d}
productPrice : {100,200,300}
productSKU : {A,B,C,D}
productInventoryQuantity : {1,2,3,4}

The result I want(JSON):

[
{
“productName ”: “a”,
“productPrice ”: “100”,
“productSKU ”: “A”,
“productInventoryQuantity ”: “1”
},

{
“productName ”: “b”,
“productPrice ”: “200”,
“productSKU ”: “B”,
“productInventoryQuantity ”: “2”
},

{
“productName ”: “c”,
“productPrice ”: “300”,
“productSKU ”: “C”,
“productInventoryQuantity ”: “3”
}

]

I used to solve this problem with iterator and arrayaggregator.
However, the bundles are split based on the number of options, which is wasting operations, and I’d like to find a new way.

Have you thought about assigning the arrays first using addArray() in a set multiple variables module and then assembling them with a complex array function merge?

There is a post I made last year called Make for Make Newbies Video Series I: All About that Data that may help you learn about these operations-saving functions. It requires some trial and error but I think there is a way.