Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compare only keys #21

Closed
jmls opened this issue Mar 8, 2018 · 1 comment
Closed

compare only keys #21

jmls opened this issue Mar 8, 2018 · 1 comment

Comments

@jmls
Copy link

jmls commented Mar 8, 2018

is it possible to compare 2 json objects and only compare the key names, rather than the values ?

for example

var a = { foo: 'bar', baz:true}
var b = { foo: 'boo', bingo:false}

if I compare b with a, I would like to get that baz has been added, bingo removed and ignore foo

in this event, I want b to end up being

{ foo: 'boo', baz:true }

@wbish
Copy link
Owner

wbish commented Mar 10, 2018

Thanks for the question, @jmls. I've opened #23 to track the ability to support this.

@wbish wbish closed this as completed Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants