powered by
Does the path exist?
json_path_exists(x, path)
A JSON vector.
Path to element. This must be a valid JSONpath expression. For example "$.a.b[0] extracts the 1 in {"a": {"b": [1, 2]}}.
"$.a.b[0]
1
{"a": {"b": [1, 2]}}
A logical vector.
# NOT RUN { json_path_exists( c( '{"a": 1}', '{"b": 2}', "[1, 2]", NA_character_ ), "$.a" ) # }
Run the code above in your browser using DataLab