ignore order of keys?
scramble45 opened this issue · comments
Is there a way to ignore the order of keys? I don't care about the order in which keys reside in the array of objects only that those keys exists and their values exists across both array of objects.
Something like this exists in the python version.
https://github.com/seperman/deepdiff#ignore-order
var t1 = {1:1, 2:2, 3:3, 4:{"a":"hello", "b":[1, 2, 3]}}
var t2 = {1:1, 2:2, 3:3, 4:{"a":"hello", "b":[1, 3, 2, 3]}}
var diff = DeepDiff(t1, t2, ignore_order:true)
console.log(diff)
I've the same problem, any news about this ? Thank you
Ended up just using lodash, _.map and filter to get them spitting out in order.
Probably wouldn't be too hard to get a PR pushed up for making this an option.
…Sent from my iPhone
On Mar 18, 2018, at 9:19 PM, Daweed ***@***.***> wrote:
I've the same problem, any news about this ? Thank you
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
@jsfuchs contributed some code that I finally got merged and tested. I'm pretty sure it was broken for a while after first merging... in any case, look at the tests here for an example.