jsonpath
jsonpath copied to clipboard
Cannot use typeof inside filter script
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.