jmespath / jmespath/jmespath.py
Does jmespath support random selecting?
- Dominant language
- Python
- Stars
- 2.4k
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
example data:
```
{
"stores":{
"s1":{
"id":"s1",
"openTime": 1234567890
},
"s2":{
"id":"s2",
"openTime": 1234567891
},
"s3":{
"id":"s3",
"openTime": 1234567892
},
"s4":{
"id":"s4",
"openTime": 1234567893
}
}
}
```
I can get 'id's with
stores.*.id
I can get first id with
stores.*.id | [0]
Is there any build in function that let me random select an id from 'id's ? [something like jinja2 random filter](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#random-number-filter):
stores.*.id | random
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.