I have an array of objects like this:
"data":
[
{"name":"Jane Doe",
"age":28,
"title":"Manager"
},
{"name":"James Brown",
"age":20,
"title":"Intern"
},
{"name":"Irene Vargas",
"age":35,
"title":"Accountant"
},
]
and I have a separate array of objects:
[
{"experience": "7 years",
"hobby": "Music"
},
{"experience": "6 months",
"hobby": "Video games"
},
{"experience": "15 years",
"hobby": "Skydiving"
},
]
How do I add values from 2nd array to the first one, result should be like this:
"data":
[
{"name":"Jane Doe",
"age":28,
"title":"Manager",
"experience": "7 years",
"hobby": "Music"
},
{"name":"James Brown",
"age":20,
"title":"Intern",
"experience": "6 months",
"hobby": "Video games"
},
{"name":"Irene Vargas",
"age":35,
"title":"Accountant",
"experience": "15 years",
"hobby": "Skydiving"
},
]
I can't figure out how to add values from the 2nd array separately to the 1st array, any help and advise is greatly appreciated.