[SOLVED] JSONPATH doesn't evaluate correct

I created an item like this:

String hueWoonkamer “Woonkamer Result” { http="<[$.state.any_on))]" }

I get an error:

org.openhab.core.transform.TransformationException: Invalid path ‘$.state.any_on)’ in ‘{“name”:“Woonkamer”,“lights”:[“1”,“2”,“3”,“4”,“5”,“6”,“8”,“9”],“type”:“Room”,“state”:{“all_on”:false,“any_on”:false},“recycle”:false,“class”:“Living room”,“action”:{“on”:false,“bri”:254,“hue”:8404,“sat”:140,“effect”:“none”,“xy”:[0.4575,0.4099],“ct”:366,“alert”:“select”,“colormode”:“xy”}}’

If I copy this result in jsonpath.com and evaluate $.state.any_on it gives me the value false as expected.

So, what am I doing wrong? Is the word state forbidden? I’m a noob with jsonpath so any help is appreciated.

I’m running 1148



This looks like it has one too many ending parens. Try this:

String hueWoonkamer 	"Woonkamer Result" { http="<[$.state.any_on)]"

So simple, I’m a donkey. Thanks!