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

Add support for Conditionals and Comparisons '==, !=' #94

Closed
kenjones-cisco opened this issue Sep 27, 2017 · 2 comments
Closed

Add support for Conditionals and Comparisons '==, !=' #94

kenjones-cisco opened this issue Sep 27, 2017 · 2 comments

Comments

@kenjones-cisco
Copy link
Contributor

Add support for Conditionals and Comparisons '==, !='

The expression ‘a == b’ will produce ‘true’ if the result of a and b are equal (that is, if they represent equivalent JSON documents) and ‘false’ otherwise. In particular, strings are never considered equal to numbers. If you’re coming from Javascript, jq’s == is like Javascript’s === - considering values equal only when they have the same type as well as the same value.

!= is “not equal”, and ‘a != b’ returns the opposite value of ‘a == b’
@mikefarah
Copy link
Owner

Support for '==' is there, but not '!=' (although this can be done by using not.

@mikefarah mikefarah reopened this Mar 15, 2022
@mikefarah
Copy link
Owner

Actually '!=' is there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants