Skip to content

Copy values and paths

The copy commands put a node’s key, path, or JSON on the clipboard, for example to paste a value into a bug report or a path into a script. Select a node in the tree, then use a shortcut, the Edit menu, or the node’s context menu.

Command Shortcut Copies
Copy Key Ctrl+Shift+K The member’s key, without quotes
Copy Path Ctrl+Shift+P The path from the root, such as $.orders[1].status
Copy Value Ctrl+Shift+V The value as JSON, as written in the file

Copy Value copies the JSON text of the node: a string keeps its quotes and escapes, as in "a\nb", and an object or array is copied whole. The Copy value button that appears when you hover over a tree row does the same, and so does Ctrl+C in the tree. One copy can hold up to 50 MiB; see Limits.

A path starts with $, the root, and adds one part per level:

  • .key for an object member, such as $.config.port.
  • ["key"] for a key that is empty or contains a space, a dot, brackets, quotes, or a backslash, such as $["user name"] or $["a.b"].
  • [n] for an array element, counting from 0, such as $.items[0].

This is the format of the breadcrumb bar, the Properties panel, and Go to Path. It looks like JSONPath, but keys such as first-name stay in the .key form, which strict JSONPath tools reject; write them as ['first-name'] there.

  • Copy JSON (formatted), Ctrl+Shift+C, copies the node indented with two spaces.
  • Copy JSON (minified) copies it on one line, without spaces.

Both keep every number, key, and escape as written in the file: 1.0 stays 1.0, a 20-digit integer keeps its digits, and a key that appears twice stays twice. A node from a file that is not valid JSON is copied as written.

To copy several nodes at once, select them with Ctrl+click and choose Copy Selected Values, or select Copy selected above the tree. Each node’s JSON goes on its own line.

To paste data into a document, a spreadsheet, or code, right-click a node and choose Copy As, then a format:

Format Works on Copies
Copy as Markdown Table An array of objects A table with one column per key and one row per object
Copy as CSV An array of objects Comma-separated values with a header row
Copy as TypeScript Type Any node An interface for the node
Copy as Python Dict Any node The value as a Python literal, with True, False, and None
Copy as PHP Array Any node The value as a PHP array literal
Copy as YAML Any node The value as YAML

For an array of objects, the TypeScript type merges the first 500 elements: a property that some of them lack is optional, and a property that holds different types gets a union. For the same in other languages, use Export Types.

Numbers are copied as written in the file. The Python, PHP, and YAML formats write a key that appears twice in an object twice, in file order; strict YAML loaders reject such a document. The table formats and the TypeScript type keep one column or property per key, with the last value. In a Markdown or CSV table, an element that is not an object becomes a row with its value in a value column. An empty array has no rows: the notice says so and the clipboard is left as it was. A node larger than 10 MiB is not converted; see Limits.

A text value that YAML would read as another type, such as True, ~, yes, or 0x1F, is quoted, and so is a key such as null.

To copy the decoded form of a Base64, JWT, URL-encoded, or date value, right-click it and choose Copy Decoded Value; see Decoded values.