Insert
Insert to collections, by this method you can insert data with your schema's into your collection
insert({data}, schema, (success)=> {}, (error)=> {})
insert({data}, schema, (success)=> {}, (error)=> {})How to use:
my_collection.insert(
{key: value},
mySchema,
(success) => alert('Hoorai'),
(error) => alert(error)
);Arguments:
parameter
required
types
data
yes
object
schema
yes
schema variable
success callback
yes
function
failure callback
yes
function
Example:
Last updated
Was this helpful?