-
Notifications
You must be signed in to change notification settings - Fork 51
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
Support ES6-style compact object literals for multiselect #43
Comments
This was referenced Feb 26, 2022
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Say I have this JSON object and want to pare it down to just the ids and first names:
I can do that with this expression:
values[*].{id:id, first:first}
.Since
{x:x, y:y}
is such a common pattern, ES6 introduced compact object literal notation to simplify this. In ES6,{x,y}
is equivalent to{x:x, y:y}
.I don't believe
{x,y}
is valid in JMESPath, so it would be a boon (and intuitive to JS users) to add this to the spec.The text was updated successfully, but these errors were encountered: