having a spot of bother getting this extractor to work
$…[?(@.type==‘HAHVACTemperatureSensor’)].id
for this json response body:
[{“id”:“AD-01-01-01-01-01-01-01”,“name”:“Lamp 1”,“type”:“Lamp”,“protocol”:[],“isZwave”:false,“isGeneric”:false},{“id”:“00-1E-5E-09-02-03-86-AD”,“name”:“Your Receiver”,“type”:“HAHVACThermostatSLR2”,“protocol”:[“zigbee”],“isZwave”:false,“isGeneric”:false,“minTemperatureSetting”:5,“maxTemperatureSetting”:32,“maxNumSetpoints”:6},{“id”:“00-1E-5E-09-02-00-54-CC”,“name”:“Your Thermostat”,“type”:“HAHVACTemperatureSensor”,“protocol”:[“zigbee”],“isZwave”:false,“isGeneric”:false}]
The extractor worked fine when run under v1.5.6 but fails under v2.0.0 with:
failed: jsonPath($…[?(@.type==‘HAHVACTemperatureSensor’)].id).find(0).exists failed, could not extract: could not extract : string matching regex [$_\p{L}][$_\-\d\p{L}]*' expected but [’ found