I encountered that proble that I would like to get the 1st array in an array of array.
[1,2,3], [4,5,6], [7,8,9]
And I only want to pick the 1st set, [1,2,3].
I tried for a long time, but it will turn to 1,2,3,4,5,6,7,8,9 and output 1 only.
Could you help to provide some helps? Thanks
Best answer by andywingraveBest answer by andywingrave
Hey! If you want to combine all of this into one array, you can do this with a code-step and a small bit of JavaScript. If you’re just wanting to get each value from item_1, you can do this with the Formatter step, and “Split”, making sure to split on the comma. Something like this, for example:
+1, running into the same problem. Response from an app such as Shopify’s Order Fulfillment Variants contains Arrays of IDs sent with each fulfillment. @nicksimard When attempting to use Line-Item to Text or use this field in other triggers it is converted to comma separated list of all the IDs so unable to extract the first set of IDs
Shopify Fulfillment Line Items Variant IDs ArrayTransformed InputOutput of Line-Item to Text
Desired output would be item_1: 33195676041347, item_2: 32587763548291,33918456365187. Or any other way to parse out these separate arrays would be ideal.
Hey! If you want to combine all of this into one array, you can do this with a code-step and a small bit of JavaScript. If you’re just wanting to get each value from item_1, you can do this with the Formatter step, and “Split”, making sure to split on the comma. Something like this, for example:
Hey @andywingrave, so actually the desired behavior is to extract the items of the first array given the output of an App is as such [1,2,3], [4,5,6], [7,8,9]. When we pass it into a code step or formatter it is transformed/read in as 1, 2, 3, 4, 5, 6, 7, 8, 9 and thus we lose the ability to segment out the first array values (1, 2, 3)