I have two json files - data.json and dataForUpdate.json
data.json:
[{"name": "test",
"isDefault": true,
"settings": {
"type": "Separation",
"scanner": {
"brightness": 0,
"contrast": 0,
"threshold": 0,
"isDuplex": false,
},
"image": {
"invertImage": false,
"autoRotate": true,
"rotateValue": -180
}
}
}]
dataForUpdate.json:
[{"name": "other",
"isDefault": false,
"settings": {
"scanner": {
"brightness": 100,
"contrast": 50,
},
"image": {
"autoRotate": false,
"rotateValue": 0
}
}
}]
I need to update first json with values from second. How can I do it without JSON.parse and hardcodded replacing.