I have two json files as such:
json1
{
"plans": {
"buildings": [
{
"floors": ["1" "2" "3" ]
},
{
"floors": ["1"]
}
]
}
}
json 2
{ "plans": {
"buildings": [
{
"floors": ["3" "5" "6" ]
},
{
"floors": []
}
]
}
}
Required json after merge union
{
"plans": {
"buildings": [
{
"floors": ["1","2","3","5","6" ]
},
{
"floors": ["1"]
}
]
}
}
How to achieve this operation by getting json diff and merge patching using available tools.I dont want to loop through each and every child nodes and check manually.