I've this JSON (I know it's not a very conventional JSON ;) )
{
"2958114":{"stockOnline": 305 },
"2958113": {"stockOnline": 2},
"2958115": {"stockOnline": 0}
}
I want to extract all line with stockOnline attribute <> 0 with a JSON query (I use the https://jsonpath.com/ to test on line)
I try this query
$.*[?(@.stockOnline != 0)]
that returns all stockOnline values but not the complete line.
I try other queries without success.
have you any ideas ?
Thanks and regards
I try this query $.[?(@.stockOnline != 0)]* that returns all stockOnline values but not the complete line.