I want to merge two JSON files while the data overwrites itself in the main JSON file.
My main object is the following:
{
"data": [
{
"name": "name1",
"gender": "male",
"age": "20",
"subject": "Python",
"pass": "No"
}
]
}
"new data.json" needs to be overridden with the following:
{
"data": [
{
"name": "name1",
"subject": "Python",
"pass": "Yes"
}
]
}
The result object should be:
{
"data": [
{
"name": "name1",
"gender": "male",
"age": "20",
"subject": "Python",
"pass": "Yes" //updated
}
]
}