jsonpath icon indicating copy to clipboard operation
jsonpath copied to clipboard

Cannot use typeof inside filter script

Open uPaymeiFixit opened this issue 2 years ago • 0 comments

I want to modify an element only if it has a specific data type. In this example, I only want to modify categories of the type string.

JSONPath.apply(readme_example, '$..category[?(typeof @ === "string")]', () => 'CHANGED');

I may be using it wrong, but from all the examples I've seen it appears this should work.

uPaymeiFixit avatar Dec 02 '22 02:12 uPaymeiFixit