Description Usage Arguments Value See Also Examples
Create a mongo.code object for appending to a buffer with
mongo.bson.buffer.append()
or for embedding in a list such
that
mongo.bson.buffer.append.list()
will properly insert a
code value into the mongo.bson.buffer object.
1 | mongo.code.create(code)
|
code |
(string) javascript code |
A mongo.code object
mongo.code,
mongo.bson.buffer.append
,
mongo.bson.buffer.append.list
,
mongo.bson.buffer,
mongo.bson.
1 2 3 4 5 6 7 8 9 10 11 12 13 | buf <- mongo.bson.buffer.create()
code <- mongo.code.create("y = x")
mongo.bson.buffer.append(buf, "Code", code)
lst <- list(c1 = code, One = 1)
mongo.bson.buffer.append.list(buf, "listWcode", lst)
mongo.bson.buffer.append.code(buf, "Code2", "a = 1")
b <- mongo.bson.from.buffer(buf)
# the above will create a mongo.bson object of the following form:
# { "Code": (CODE) "y = x",
# "listWcode" : { "c1" : (CODE) "y = x",
# "One" : 1 },
# "Code2" : (CODE) "a = 1" }
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.