In JavaScript, all Objects act a bit like hashmaps. However, the keys to these hashmaps must be strings. If they\'re not, they\'re converted with toString()
. Tha
jOrder could be modified to treat objects with the same properties (but in different order) as identical when performing an index lookup.
If you have the object {bar: 2, baz: 3, val: 200}
in your list, and you've previously put a fitting index on a jOrder table like this:
var table = jOrder(data)
.index('signature', ['bar', 'baz'], {grouped: true});
Then right now table.where([{bar: 2, baz: 3}])[0].val
will return 200, but table.where([{baz: 3, bar: 2}])[0].val
won't.
It wouldn't take much effort though to make it not depend on the order of properties. Let me know if you're interested and I'll push the fix to GitHub as soon as I can.