Search by a condition on an object keys Jayway jsonpath

23 views Asked by At

I have an object that looks like:

{
    "item_1": {...},
    "item_2": {...},
    "object_1": {...}
}

Is there a way I could only take the objects which keys match the regex item.*? The return object would be:

{
    "item_1": {...},
    "item_2": {...},
}

I tried playing around with the .keys() function but it doesn't seem like I can operate on the return value.

Thanks in advance :)

0

There are 0 answers