Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cannot use typeof inside filter script #179

Open
@uPaymeiFixit

Description

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

        AltStyle によって変換されたページ (->オリジナル) /