'JsonPath - Filter Operators - Read filtering value(s) from file or environment variable

Is there are way to use values for filtering from file or environment ?

Example: Static way - [?(@.units in [80,81,82,83,84,85,86,87,88,89,90])]

Above line will filter records where "units" field value is in that list

Dynamic way (Read from file) - [?(@.units in ${file:/data.properties:FILTER_VALUES})]

OR

Dynamic way (Read from environment) - [?(@.units in $FILTER_VALUES)]

Reference: https://github.com/json-path/JsonPath#filter-operators



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source