You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot figure out how I would go about doing this.
I looked into the patch function and thought about applying it to a default state of the object but suppose a key is set to boolean true while the default is false but the two objects don't differ in this key then applying the patch to the default and looking at the default would indicate this value has changed to false.
Essentially I just want a diff with minimal extra tooling.
The text was updated successfully, but these errors were encountered:
Ah good call, this was towards the end of the work day as I was despairing 👍
So the the diff function returns me a patch object with json pointers, I assume I can then look at the pointers to see which specific keys have changed.
::diff was what I needed, thank you. I ended up just writing parts of the object that the diff had an op for to file, I had to parse the json path { "op": "replace", "path": "/XX/YY/0/centerFrequencyInHz", "value": 9933743300.0 },
To create the nested structure with {"XX" : {"YY": [{"centerFrequencyInHz" : 9933743300.0 }]}}
but this is fine, I assume there isn't much need for the library to provide something like common(left, right, patch) which would output that directly using the patch to erase everything else.
I cannot figure out how I would go about doing this.
I looked into the patch function and thought about applying it to a default state of the object but suppose a key is set to boolean true while the default is false but the two objects don't differ in this key then applying the patch to the default and looking at the default would indicate this value has changed to false.
Essentially I just want a diff with minimal extra tooling.
The text was updated successfully, but these errors were encountered: