-
Notifications
You must be signed in to change notification settings - Fork 176
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
Ability to set and delete based on a jmespath #121
Comments
I too would be interested in deletion but rather as part of the language. Something like this:
The above would (rather unexcitingly) produce two empty dictionaries. However the potential is exciting - if those dictionaries had started out with all manner of other keys those other keys would be preserved! |
I note that there is some discussion about having a |
Did anything happen to this? We are needing to look into using a jq binding instead entirely because this is missing :( |
I was also looking for this ability, but it may not fit well with jmespath. I'm thinking glom might be a better alternative: https://glom.readthedocs.io/en/latest/ |
This is a feature great to have. Currently have to pipe to Given the input {
"foo": {
"bar": [
{
"name": "one"
},
{
"name": "two"
}
]
}
} To set: {
"foo": {
"bar": [
{
"name": "one"
},
{
"name": "three"
}
]
}
} To delete: {
"foo": {
"bar": [
{
"name": "one"
}
]
}
} |
Can this be considered for any upcoming improvements? |
For example if I had following dict;
I'd like to be able to change the value of "one" to "three" be using something like;
And then remove the first item of the "bar" list;
The text was updated successfully, but these errors were encountered: