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

Appearance settings

Cannot resolve JSONPath has single quote #203

Copy link
Copy link
@superdc

Description

@superdc
Issue body actions

Describe the bug

Code sample or steps to reproduce

// Code that reproduces problem here
const json = {
    "firstName": "John",
    "'lastName'": "doe",
    "address": {
        "streetAddress": "naist street",
        "city": "Nara",
        "postalCode": "630-0192"
    },
    "phoneNumbers": [
        {
            "type": "iPhone",
            "number": "0123-4567-8888"
        },
        {
            "type": "home",
            "number": "0123-4567-8910"
        }
    ]
}

const normalizedPaths = JSONPath({ path: `$["'lastName'"]`, json, resultType: 'path', wrap: false })

Console error or logs

Expected behavior

Expected result

now normalizedPaths is undefined
expected normalizedPaths should be $["'lastName'"]

Environment (IMPORTANT)

  • JSONPath-Plus version: 7.2.0

Desktop**

  • OS: MacOS
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.