---
title: "Copy JSONPath, jq and JavaScript Paths - Blobster"
description: "Understand the difference between JSONPath, jq and JavaScript property paths and copy the correct syntax from a nested JSON value."
canonical: "https://www.mochavi.com/blobster/guides/copy-jsonpath-jq-javascript"
markdown_mirror: "https://www.mochavi.com/blobster/guides/copy-jsonpath-jq-javascript.md"
language: "en"
generated_from: "prerendered HTML"
---

> Canonical HTML: [https://www.mochavi.com/blobster/guides/copy-jsonpath-jq-javascript](https://www.mochavi.com/blobster/guides/copy-jsonpath-jq-javascript)
>
> This machine-readable Markdown mirror is generated from the canonical page during the Mochavi production build.

[Blobster](https://www.mochavi.com/blobster) / [Guides](https://www.mochavi.com/blobster/guides)

Path guide

# Find a value, then copy the path you actually need.

JSONPath, jq and JavaScript property access look similar, but they solve different jobs. Use the selected value to produce the right syntax without retyping it.

Published 28 July 2026 7 minute read By Mochavi

[Install Blobster](https://chromewebstore.google.com/detail/blobster/epddolhfilamhbnmgglenceabjbbeeho) [Read as Markdown](https://www.mochavi.com/blobster/guides/copy-jsonpath-jq-javascript.md)

Short answer

Use JSONPath for standardised JSON selection, jq when the path belongs in a command-line transformation, and JavaScript property access when the destination is application code.

## Key points

-   The same selected value can be represented in several path syntaxes.
-   Keys with punctuation or spaces require bracket or quoted notation.
-   Copying from the tree avoids transcription errors in long paths.

## One value, three destinations

Suppose an API response contains an email under the first user’s profile. A support note, a shell command and frontend code may all refer to the same value, but each context expects different syntax.

Example document

```
{
  "users": [
    {
      "profile": {
        "email": "ada@example.test"
      }
    }
  ]
}
```

| Use | Path |
| --- | --- |
| JSONPath | `$.users[0].profile.email` |
| jq | `.users[0].profile.email` |
| JavaScript | `data?.users?.[0]?.profile?.email` |

## JSONPath selects values

JSONPath is standardised in RFC 9535. It begins at the root with `$` and can select object members, array elements, slices and filtered descendants. It is useful in test tools, API clients and systems that explicitly accept JSONPath.

A simple copied path identifies one value. More advanced JSONPath expressions can select several values, so do not assume every expression behaves like a unique object address.

## jq is a processing language

jq paths often resemble JSONPath after the root marker, but jq is a complete command-line processing language. The path may be the first step in a filter, projection or transformation.

Use the copied jq path as a reliable starting point, then add the operation the script needs. For example, `.users[].profile.email` streams the email value for each user.

## JavaScript paths belong in code

Optional chaining is useful when application code must tolerate a missing intermediate value. It returns `undefined` instead of throwing when an optional access encounters `null` or `undefined`.

Keys that are not valid JavaScript identifiers need bracket notation. A key named `feature.flag` becomes `data?.["feature.flag"]`, not `data?.feature.flag`.

## Copy from selection instead of retyping

Long paths are easy to mistype, especially around array indexes and keys that need quoting. Blobster lets you select a tree node, table cell or search result and copy JSONPath, jq or JavaScript syntax from the same inspector.

The copied path describes the current document. If the schema is unstable or an array order changes, verify that an index-based path is still the right reference.

## Sources

-   [RFC 9535: JSONPath](https://www.rfc-editor.org/rfc/rfc9535)
-   [jq manual](https://jqlang.org/manual/)
-   [MDN: optional chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining)

Related

[Copy JSONPath from JSON→](https://www.mochavi.com/blobster/copy-jsonpath-from-json)[Private JSON formatter→](https://www.mochavi.com/blobster/private-json-formatter)

Machine-readable

[Markdown version→](https://www.mochavi.com/blobster/guides/copy-jsonpath-jq-javascript.md) [Blobster RSS feed→](https://www.mochavi.com/blobster/feed.xml)

Local-first workbench

## Inspect the data. Keep the document local.

Open JSON, logs, tokens, configs and tables in Blobster without adding an account, telemetry or a public paste URL.

[Install from Chrome Web Store](https://chromewebstore.google.com/detail/blobster/epddolhfilamhbnmgglenceabjbbeeho)
