No file open
Create a new file or open an existing one from the sidebar
Right-click any value in the tree to copy its path.
No file open
Create a new file or open an existing one from the sidebar
To get the path to a value in JSON, find it in the tree and right-click it. Copy path gives you a JSONPath expression like $.items[1].price, and Copy path as gives you the same location in JavaScript, jq or JSON Pointer form.
Keys with spaces, dots or dashes switch to bracket notation automatically, so the path you copy actually works when you paste it into code. Press Ctrl+V or Cmd+V on the tree to load your own JSON.
{
"customer": {
"shipping address": {
"city": "London",
"postcode": "NW1 6XE"
}
}
}JSONPath $.customer['shipping address'].city
JavaScript data.customer["shipping address"].city
jq .customer["shipping address"].city
JSON Pointer /customer/shipping address/cityThey all point at the same place, they just come from different tools. JSONPath ($.a.b[0]) is used by API testing tools and plenty of libraries, jq paths (.a.b[0]) work in the jq command line tool, and JSON Pointer (/a/b/0) is the RFC 6901 format that JSON Patch and JSON Schema use.
They get quoted. A key like first name becomes $['first name'] in JSONPath and data["first name"] in JavaScript, and JSON Pointer escapes ~ and / as ~0 and ~1.
Yes, the same menu has Copy key (or Copy index for array items) and Copy value.
Switch to Query view and type it in, the matches update as you type. The JSONPath tester page has the details.
No, this runs entirely in your browser, so nothing you paste is sent to a server. The only feature that sends data anywhere is the optional AI assistant, and only when you actually ask it something.