JSONPath
PARSEJSON
Extracts values from JSON strings or ranges using JSONPath-style paths.
Syntax
=PARSEJSON(json, path)Parameters
jsonpathReturns
A scalar value, JSON text for arrays/objects or multiple matches, or a grid matching the input range. Blank input cells and matched JSON null return blank. Invalid JSON and paths with no matching value produce native #ERROR! errors.
Example
=PARSEJSON(A1, "items[1].price")Result: 15
For JSON like {"items":[{"price":10},{"price":15}]}.
Notes
The root marker $ is optional for child paths. Using $ alone returns the entire JSON value, including zero and false.
Uses the JSONPath Plus dialect: dot paths, nonnegative array indexes, wildcards, recursive descent, slices with positive steps, and filters. Full RFC 9535 compliance is not claimed.
Negative slice bounds such as items[-2:] are supported; direct negative indexes such as items[-1] are not. Slice selections remain JSON text, even for one item.
Objects, arrays, and wildcard/filter selections return JSON text in one cell. Only range inputs spill, preserving their original rows and columns.
Use =IFERROR(PARSEJSON(A1,"optional"),"") for an explicit blank fallback. A missing match in any cell fails the range formula call.
Parses supplied cell text in Google Apps Script™; it does not fetch JSON from URLs or APIs. Limited Amplitude usage metadata includes success/error status and excludes formula text, arguments, cell values/results, and spreadsheet identifiers. See the privacy policy for feedback and separate error diagnostics.