json-viewer icon indicating copy to clipboard operation
json-viewer copied to clipboard

[Feature Request] Copy a segment

Open markomitranic opened this issue 10 months ago • 0 comments
trafficstars

Dear authors, than you for this great extension.

It has only 1 feature that I miss from the best-in-class BetterJSON (Safari-only) which allows you to copy a property value or name. The copy function we have right now, only puts the whole json into the clipboard, while theirs also allows you to copy the value or even the key path.

These functions seem insignificant, but are especially useful when working with large JSONs, debugging or searching for something - I spend time digging and find what I am looking for, but I cannot copy it as a pasteable, formatted, JSON.

Here is an example, the prices value: Screenshot 2025-01-02 at 15 32 42

For reference, here is how it works in BetterJSON: Screenshot 2025-01-02 at 15 33 24

As well as the output it produces:

[
  {
    "market": "Singapore",
    "currency": "GMD",
    "unitPrice": 884.08
  }
]

markomitranic avatar Jan 02 '25 14:01 markomitranic