cancel
Showing results for 
Search instead for 
Did you mean: 

Join 2 arrays

Sahil
Contributor

I have 2 different arrays, one having id, header and another having id,name.
Need to join these 2 arrays and get an output file of id,header,name.
I need json splitter json path, I have just for id which is jsonPath($, “id[*]”).
How do I include both id and header.
File.txt (4.2 KB)

1 ACCEPTED SOLUTION

bojanvelevski
Valued Contributor

try different mapping, change the ‘$’ to something else

View solution in original post

15 REPLIES 15

bojanvelevski
Valued Contributor

Can you provide a sample of how the object looks? If you’re having both arrays in one object than you can use copy, in the upper branch split the first array, and in the lower one, split the other. Than you can join both streams with a Join snap.

Input:
image

Setup:

image

Output:

image

Thank you, could you please tell me what should be the json path for splitting the array?

bojanvelevski
Valued Contributor

In the sample I provided, the json paths are the names of the arrays, $array1/array2 accordingly.

Hi
Sample xml File is uploaded in the original question.
I need to create output csv file having output as:-
Uber John
Uber Michael
Ola Shane
Ola Wick