Skip to main content

JSON Parser By Inventor Commons

Input

Output

What is JSON Parser

JSON Parser is a powerful tool that allows you to extract specific data from JSON data using a query language called JSONPath. With the JSON Parser, you can write complex queries to navigate and extract data from JSON documents, and get the results you need quickly and accurately.

What is JSONPath

JSONPath is a query language used to extract specific data from JSON documents. It is similar to XPath for XML, but is designed specifically for JSON data.

Syntax

Below is the currently available syntax, note that not all of these may be valid within inventor

  • $ - the root object/element
  • @ - the current object/elements
  • . or [] - child operator
  • .. - recursive descent. JSONPath borrows this syntax from E4X.
  • * - wildcard. All objects/elements regardless of their names
  • [] - subscript operator. XPath uses it to iterate over element collections and for predicates. In Javascript and JSON it is the native array operator.
  • [,] - Union operator in XPath results in a combination of node sets. JSONPath allows alternate names or array indices as a set.
  • [start:end:step] - array slice operator borrowed from ES4
  • length(path) - Custom inventor syntax to get the length of an array