# NOT RUN {
x <- c('{"a": 11, "b": {"x": 12}}', NA)
json_delete(x, "$.a")
# remove from multiple paths at once
json_delete(x, "$.a", "$.b")
# remove at a nested path
json_delete(x, "$.b.x")
# non-existing elements are just ignored
json_delete(x, "$.abc")
# }
Run the code above in your browser using DataLab