For the example below, the first item in the values array (1) can be selected using a JsonPath value of $.data.values.[0]:
{
"type" : "line",
"data" :
{
"labels" : ["Sunday", "Monday"],
"values" : [ 1, 2 ]
}
}
In this example a single numeric value was selected. However it is possible to select a complete subset of the incoming JSON,
for example: $.data would select the entire data object into the out slot, or $.data.values would select the entire JSON “values” array. Any expression containing a search with $..labels, for example, will return search results enclosed within an outer array.
Much more explanation of this powerful tool can be found at the following websites:
https://goessner.net/articles/JsonPath/http://jsonpath.com/https://www.baeldung.com/guide-to-jayway-jsonpath