jmespath / jmespath/jmespath.py
Ability to set and delete based on a jmespath
Open
feature-request
- Dominant language
- Python
- Stars
- 2.4k
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
For example if I had following dict;
```
data = {
"foo": {
"bar": [
{"name": "one"},
{"name": "two"}
]
}
}
```
I'd like to be able to change the value of "one" to "three" be using something like;
```
new_data = jmespath.replace('foo.bar[1].name', 'three', data)
```
And then remove the first item of the "bar" list;
```
new_data = jmespath.remove('foo.bar[1]', data)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.