I have the following json :
{
"dataset_1": {
"size_in_mb": 0.5,
"task": "clean",
"tags": ["apple", "banana", "strawberry"]
},
"dataset_2": {
"size_in_mb": 100,
"task": "split",
"tags": ["apple"]
},
"dataset_3": {
"size_in_mb": 1024,
"task": "clean",
"tags": ["strawberry"]
}
}
How do I :
- get datasets which have a tag called "apple"
- get datasets which are larger than 500mb
- get datasets which have task as "split"
I am able to query the properties of a dataset, but not able to extract the name of the dataset with a certain property. e.g I can get ["strawberry"], but not ["dataset_1", "dataset_3"] when "tags" contains "strawberry".
This question comes close, but basically says you can't use jmespath.