Finds every value in the JSON that a JSONPath expression matches and gives them as a list, even when there is only one.
$.parts[*].name lists all part names and $..radius every radius at any depth; JSONPath
filters in square brackets narrow the matches by a condition.
The JSON and the JSONPath expression
The matching values as a list
Sets property prop to value on every object a JSONPath expression reaches, giving a
changed copy of the JSON.
path points at the parent objects, prop names the property on them: path: "$.parts[*]", prop: "visible" changes every part. A value that is not an object throws an error.
The JSON, the path to the parent objects, the property name and the value
The changed copy
Applies several setValue changes in one go: entry i of paths, props and values is
one change, applied in order to a copy of the JSON.
The JSON and the matching lists of paths, property names and values
The changed copy
Lists the paths of every value a JSONPath expression matches, each as a full path from the
root such as $['parts'][0]['name'], instead of the values themselves.
The JSON and the JSONPath expression
The paths of the matches, as a list of strings
Hands the JSON to the running application to show it and offer to save it as a file; the application decides how the preview looks, and nothing happens when the value is empty.
The JSON to show
Nothing
Hands the JSON to the running application to show it; the application decides how the preview looks, and nothing happens when the value is empty.
The JSON to show
Nothing
Sets one top-level property of a JSON object to a value, giving a changed copy; the input stays as it is and a property that did not exist is added.
The JSON object, the property name and the value
The changed copy
Finds the first object in a list whose property equals the given value, comparing with strict equality, and gives it back; nothing matching gives undefined.
For anything beyond one property, use query with a filter.
The list of objects, the property name and the value to match
The first matching object, or undefined
Reads one top-level property of a JSON object; a missing property gives undefined.
The JSON object and the property name
The property's value
Turns any JSON-compatible value into its JSON text, on one line without indentation, as
JSON.stringify does.
The value to write as text
The JSON text
Turns JSON text into the value it describes, as JSON.parse does; text that is not valid
JSON throws an error.
The JSON text
The parsed value
Reading and changing values inside JSON data. A path such as
$.parts[0].namefollows the JSONPath syntax:$is the root,.namesteps into a property,[0]into a list entry and..namesearches at any depth. The methods here query, set and list by path, work on single properties and preview data through the application; every change comes back as a changed copy, the input stays as it is.