Description Usage Arguments Value Examples
Remote the elements at the specified paths from a JSON vector.
1 | json_delete(x, ...)
|
x |
A JSON vector. |
... |
Paths to delete. |
A json2
vector similar to x
with the specified paths removed
from it.
1 2 3 4 5 6 7 8 9 10 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.