I have two files with the following JSON that I need to combine using the relative array position of each object:
PS: - I am restricted to version 1.4 as am on Solaris so don't have the [inputs] feature
File 1
{ "input": [ { "email": "[email protected]", "firstName": "Fred" }, { "email": "[email protected]", "firstName": "James" } ] } File 2:
{ "result": [ { "id": 50, "status": "created" }, { "id": 51, "status": "rejected" } ] } the expected result is the elements of input[1] combined with elements of result[1] and so on as follows:
{ "combined": [ { "email": "[email protected]", "firstName": "Fred", "id": 50, "status": "created" }, { "email": "[email protected]", "firstName": "James", "id": 51, "status": "rejected" } ] }