Description Usage Arguments Details Value See Also Examples
Append a list onto a mongo.bson.buffer.
1 | mongo.bson.buffer.append.list(buf, name, value)
|
buf |
(mongo.bson.buffer) The buffer object to which to append. |
name |
(string) The name (key) of the field appended to the buffer. |
value |
(list) The list to append to the buffer as a subobject. |
Note that the value parameter must be a true list, not an vector of a single atomic type.
Also note that this function is recursive and will append items that are lists themselves as subobjects.
TRUE if successful; otherwise, FALSE if an error occured appending the data.
mongo.bson,
mongo.bson.buffer,
mongo.bson.buffer.append
.
1 2 3 4 5 6 7 | buf <- mongo.bson.buffer.create()
l <- list(fruit = "apple", hasSeeds = TRUE)
mongo.bson.buffer.append.list(buf, "item", l)
b <- mongo.bson.from.buffer(buf)
# this produces a BSON object of the form:
# { "item" : { "fruit" : "apple", "hasSeeds" : true } }
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.