JSONSelectTests
JSONSelectTests copied to clipboard
Finding all properties that match expr
Is there a way to extract all properties that match a certain regex (NOT the values?)
For example:
{
"x_a" : 12,
"x_b" : 14,
"x_c" : 45
"value" : 34
}
What I'd like to extract above is all the pairs where the property is x_*. I can't seem to find a way to do this. A use case where this is handy is in data where some of the rows are transformed as columns, for example, a numeric column for every year. Meaning, I would have properties for every year within my range. If I wanted to extract just those values, at the moment, I can't do that without manually getting all the keys.