Insert a new element into the selected ones in a tsjson object
Source:R/insert-into-selections.R
insert_into_selected.Rd
Insert a new element into each selected array or object.
Arguments
- json
tsjson object
- new
New element to insert. Will be serialized with
serialize_json()
.- key
Key of the new element, when inserting into an object.
- at
What position to insert the new element at:
0
: at the beginning,Inf
: at the end,other numbers: after the specified element,
a character scalar, the key after which the new element is inserted, if that key exists, when inserting into an object. If this key does not exist, then the new element is inserted at the end of the object.
- options
List of options, see
tsjson_options()
. This argument must be named and cannot be abbreviated.