using variable within json path

Hi all,

i was wondering, is it possible to use a variable within a json path to help filter the data. For example:

$.values[?(@[3]==var1)]

where var1 would be a string defined through a variable. This would filter my json list for all the 3rd items that contain var1.

Many thanks in advance

3
11 replies