JSONPath provides an alternate notation, bracket-notation, which works just like dot-notation to query fields. The syntax is reminiscent of how you access fields in associative arrays, where you pass the field name as the selector to
operator to obtain the value in the named field.
In bracket notation, we will write the previous recipe's example as follows:
$['store']['book'].['title'] $['store']['book'][*].['title'] $['store']..['price'] $..['book']
As seen earlier, the first example extracts the title of the first book in the object in the field named store. The second example extracts all titles of all books in the store. The third example returns a collection ...