I want to update an array of objects within an existing json
object with the content from another json
object.
Initial object:
{
"user": "gT35Hhhre9m",
"date": "2016-01-29",
"status": "OK",
"reason": "some reason",
"content": [
{
"foo": 123,
"bar": "val1"
}
]
}
Supplementary object:
{
"id": "gT35Hhhre9m"
}
Post-merge object structure:
{
"user": "gT35Hhhre9m",
"date": "2016-01-29",
"status": "OK",
"reason": "some reason",
"content": [{
"foo": 123,
"bar": "val1"
"id": "gT35Hhhre9m"
}]
}