Open Migushthe2nd opened 4 years ago
To be honest, I didn't take a nested object into account, so as of this comment what the code actually does is just merge the immediate child of the object's properties. Which means this is an oversight in design, not related to #7.
Recursive merging has to be done inside-out, so it'll take a while to properly traverse and ensure the integrity of the object structure. In the worst case there might be a need to re-implement from scratch.
I'll keep you update on the status. Thank you very much for reporting this!
I'm trying to merge the second json (
update
) with the first (original
):and update with
But the result is
while I need it to be
Would it be possible to add an option for this? (Was this behaviour removed in https://github.com/tnptop/array-object-merge/issues/7 ?)
Edit: My code: