JSONSelectTests icon indicating copy to clipboard operation
JSONSelectTests copied to clipboard

Finding all properties that match expr

Open iros opened this issue 13 years ago • 0 comments

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.

iros avatar Jun 28 '12 16:06 iros