Skip to main content

XPath queries

Analyze JSON data using the XPath language (https://json.vason.io/open-xpath)

The XPath feature enables you to analyze JSON data using the XPath language.

XPath​

The XPath language is typically applied only to XML documents. However, Alljson allows using XPath to analyze the structure of JSON.

Examples XPath queries​

//planets/name /* select key */

(//name)[3] /* select nested node key by index */

//planets[position() >= 1 and position() <= 3]/name /* select key by range */

User interface xpath 2.0 tab​

XPathXPath
  1. To use the xpath 2.0 feature for analyze JSON from the left panel open the xpath/xslt window by clicking the left Xpath/Xslt button or typing Alt+X and choosing the xpath 2.0 tab.
  2. XPath queries:
    • In the middle of the xpath 2.0 tab, there is a text editor where you can write your own XPath queries. Click on the run button or type Ctrl+Enter to execute it.
    • To execute a recent XPath query immediately, simply click on the corresponding item in the recent (history) list. A list of recent queries can be found at the top of the xpath 2.0 tab.
  3. See the XPath query result below after executing.