Hi,
I have this JSON:
When I try this code "A": $..[?(@['{#INSTANCE}'] =~ ":")].['{#INSTANCE}']
Result is:
When I try this code "B" with regular expression: $..[?(@['{#INSTANCE}'] =~ /\w:/)].['{#INSTANCE}']
Result is ERROR:
When i tested code "B" in this walidator test is OK: https://www.site24x7.com/tools/json-path-evaluator.html
Where is problem? (ZBX 6.4.18)
I have this JSON:
[
{"{#INSTANCE}": "HarddiskVolume1"},
{"{#INSTANCE}": "HarddiskVolume2"},
{"{#INSTANCE}": "C:"},
{"{#INSTANCE}": "E:"},
{"{#INSTANCE}": "F:"},
{"{#INSTANCE}": "_Total"}
]
{"{#INSTANCE}": "HarddiskVolume1"},
{"{#INSTANCE}": "HarddiskVolume2"},
{"{#INSTANCE}": "C:"},
{"{#INSTANCE}": "E:"},
{"{#INSTANCE}": "F:"},
{"{#INSTANCE}": "_Total"}
]
Result is:
["C:","E:","F:"]
Result is ERROR:
HTML Code:
cannot extract value from json by path "$..[?(@['{#INSTANCE}'] =~ /\w:/)].['{#INSTANCE}']": unsupported construct in jsonpath starting with: "/\w:/)].['{#INSTANCE}']"
Where is problem? (ZBX 6.4.18)
Comment