I have an array of json objects like these which looks like this
[{
"Name": "Nikhil",
"Surname": "Agrawal"
}, {
"profession": "java developer",
"experience": "2 years"
}, {
"company": "xyz",
"city": "hyderabad"
}]
Now what I am trying to do is combining the whole array into single json object
{
"Name": "Nikhil",
"Surname": "Agrawal"
"profession": "java developer",
"experience": "2 years"
"company": "xyz",
"city": "hyderabad"
}
I am trying with this jQuery.merge(firstObject, secondObject)
but it takes only two arguments So again I need to apply loop and swapping the objects and so a complex logic. Is there any other way to merge this??