Title: Cannot resolve JSONPath has single quote · Issue #203 · JSONPath-Plus/JSONPath · GitHub
Open Graph Title: Cannot resolve JSONPath has single quote · Issue #203 · JSONPath-Plus/JSONPath
X Title: Cannot resolve JSONPath has single quote · Issue #203 · JSONPath-Plus/JSONPath
Description: 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" }, "p...
Open Graph Description: 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"...
X Description: Describe the bug Code sample or steps to reproduce // Code that reproduces problem here const json = { "firstName": "John", "'lastName'": "doe", &quo...
Opengraph URL: https://github.com/JSONPath-Plus/JSONPath/issues/203
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot resolve JSONPath has single quote","articleBody":"\u003c!--\r\n**PLEASE NOTE: This project is not currently being very actively developed.**\r\n--\u003e\r\n\r\n## Describe the bug\r\n\r\n\u003c!-- A clear and concise description of what the bug is. --\u003e\r\n\r\n## Code sample or steps to reproduce\r\n\r\n```js\r\n// Code that reproduces problem here\r\nconst json = {\r\n \"firstName\": \"John\",\r\n \"'lastName'\": \"doe\",\r\n \"address\": {\r\n \"streetAddress\": \"naist street\",\r\n \"city\": \"Nara\",\r\n \"postalCode\": \"630-0192\"\r\n },\r\n \"phoneNumbers\": [\r\n {\r\n \"type\": \"iPhone\",\r\n \"number\": \"0123-4567-8888\"\r\n },\r\n {\r\n \"type\": \"home\",\r\n \"number\": \"0123-4567-8910\"\r\n }\r\n ]\r\n}\r\n\r\nconst normalizedPaths = JSONPath({ path: `$[\"'lastName'\"]`, json, resultType: 'path', wrap: false })\r\n```\r\n\r\n### Console error or logs\r\n\r\n## Expected behavior\r\n\r\n\u003c!-- A clear and concise description of what you expected to happen. --\u003e\r\n\r\n## Expected result\r\nnow normalizedPaths is undefined\r\nexpected normalizedPaths should be $[\"'lastName'\"]\r\n\r\n## Environment (IMPORTANT)\r\n- JSONPath-Plus version: 7.2.0\r\n\r\n## Desktop**\r\n - OS: MacOS\r\n","author":{"url":"https://github.com/superdc","@type":"Person","name":"superdc"},"datePublished":"2024-01-28T06:41:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/203/JSONPath/issues/203"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5f2cee11-7076-52bf-69ac-bb308ed86732 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C376:B22A0:25F74EC:32D6FE5:696EDDE5 |
| html-safe-nonce | 3c27e4b862585360b83e247b75a1814c4b6b43aba54b8e7e089d147bcd50f11a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzc2OkIyMkEwOjI1Rjc0RUM6MzJENkZFNTo2OTZFRERFNSIsInZpc2l0b3JfaWQiOiI1OTgzOTQ0Mjg0NzY5ODAzNzQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ab83a56380caac6c5eb3b4576517579869628b8f0d21887d8250a22e4183d745 |
| hovercard-subject-tag | issue:2103999678 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSONPath-Plus/JSONPath/203/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b663296edcdc65b40250252d742eb095a9901ebd9dd81bed8ee2f2f07b0609dd/JSONPath-Plus/JSONPath/issues/203 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b663296edcdc65b40250252d742eb095a9901ebd9dd81bed8ee2f2f07b0609dd/JSONPath-Plus/JSONPath/issues/203 |
| og:image:alt | 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"... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | superdc |
| hostname | github.com |
| expected-hostname | github.com |
| None | b278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee |
| turbo-cache-control | no-preview |
| go-import | github.com/JSONPath-Plus/JSONPath git https://github.com/JSONPath-Plus/JSONPath.git |
| octolytics-dimension-user_id | 67874603 |
| octolytics-dimension-user_login | JSONPath-Plus |
| octolytics-dimension-repository_id | 1716525 |
| octolytics-dimension-repository_nwo | JSONPath-Plus/JSONPath |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1716525 |
| octolytics-dimension-repository_network_root_nwo | JSONPath-Plus/JSONPath |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 39aed5006635ab6f45e6b77d23e73b08a00272a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width