JSONPath-Plus / JSONPath

A fork of JSONPath from http://goessner.net/articles/JsonPath/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When key has dot then json path dont give value

ajit-pawar-sp opened this issue · comments

Describe the bug

When the key has dot in, library is unable to parse.

Code sample or steps to reproduce

let test =  {
    simpleString: "simpleString",
    "@odata.next": "@asPropertyName",
    "a$a": "$inPropertyName",
    "$": {
        "@": "withboth"
    },
    a: {
        b: {
            c: "food"
        }
    }
};

const obj = JSONPath({ path: "`@odata.next", json: test });
// Code that reproduces problem here

Console error or logs

Expected behavior

Expected result

Environment (IMPORTANT)

  • JSONPath-Plus version: 7.2.0

Desktop**

  • OS: [e.g. Windows]
  • Browser and version [e.g. chrome 65] or Node Version [e.g. 10.2]

Additional context