Dear Community,
Me again.
Here is my scenario: I have a first JSON array looking like hereunder:
[ {“Key”: “Value1”, “Field1”: “Value2”, “Field2”: “Value3”},
{“Key”: “Value2”, “Field1”: “Value4”, “Field2”: “Value5”} ]
I have a second JSON array looking like so:
[ {“Key”: “Value1”, “Field3”: “Value6”, “Field4”: “Value7”},
{“Key”: “Value2”, “Field3”: “Value8”, “Field4”: “Value9”} ]
Is there any way I can combine those without going with any iterator in order to get the following result?
[ {“Key”: “Value1”, “Field1”: “Value2”, “Field2”: “Value3”, “Field3”: “Value6”, “Field4”: “Value7”},
{“Key”: “Value2”, “Field1”: “Value4”, “Fileld2”: “Value5”, “Field3”: “Value8”, “Field4”: “Value9”} ]
Both arrays have common keys and I have an exact 1 to 1 relationship in between both arrays. I’d like to aggregate both arrays into one with all fields having the same key in the same string, preceded by the said key.
Hope this is feasible…going the array aggregator then iterator with get() and map() functions way did not make it performance wise.
Thanks to all for your support!
Tim