Skip to content

Cannot use typeof inside filter script #179

@uPaymeiFixit

Description

@uPaymeiFixit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions