migi migi - 1 year ago 144
JSON Question

Extract values from JSON array using XPath?

I'm pretty new to XPath...
I need to extract only the values 2124,143 from this JSON array using XPath.

I tried few ways but didn't succeed. Any idea?


Answer Source

XPath (traditionally, prior to v3.1, which is not widely supported) is defined over XML, not JSON.

Alternatively, consider JSONPath, an "XPath for JSON," which is also supported by Dojo Toolkit.

In JSONPath, 2124 could be accessed as $.data.values.Download.2016-06-01

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download