

Part 3 Git clone version control integration in Visual Studio Code Part 2 Git master branch source control integration in Visual Studio Code (*) These queries will locate the items, irrespective of the specific structure of the input.Part 1 Git version control integration in Visual Studio Code |select(.isbn)Īll books in the store with an isbn |. The third book in the last-mentioned book amongst all books (*) The examples in this section can be run against that database. With thanks to Stefan Goessner, a copy of that JSON object is appended for ease of reference. The JSONPath website includes a single-object "database" to illustrate JSONPath queries. generates three entities, the array itself, and its two components. The first item generated is in fact the input entity itself.įor example, |. filter generates a stream of all the entities at the ends of all paths, including the "." path. To refer to items in the input stream of the jq process as a whole, one can initially bind "." to a jq variable, e.g. to refer to the current JSON entity and so it is context-dependent: it can refer to items in the input stream of the jq process as a whole, or to the output of a filter. JSONPath distinguishes between the "root object or element" ($) and "the current object or element" (.).

The input entities may be any mix of any JSON types, not just objects or arrays. In general, given a stream of JSON entities as input, jq will produce a stream of outputs. One important point about jq here is that jq is stream-oriented: the jq expression shown above can be run not just against a single object, but also against a stream of objects.
