examples/quickstart-transforms.js
function seedData() {
  var users = db.getCollection("users");

  users.insert({ name: "odin", gender: "m", age: 1000, tags : ["woden", "knowlege", "sorcery", "frenzy", "runes"], items: ["gungnir"], attributes: { eyes: 1} });
  users.insert({ name: "frigg", gender: "f", age: 800, tags: ["foreknowlege"], items: ["eski"] });
  users.insert({ name: "thor", gender: "m", age: 35, items: ["mjolnir", "beer"] });
  users.insert({ name: "sif", gender: "f", age: 30 });
  users.insert({ name: "loki", gender: "m", age: 29 });
  users.insert({ name: "sigyn", gender: "f", age: 29 });
  users.insert({ name: "freyr", age: 400 });
  users.insert({ name: "heimdallr", age: 99 });
  users.insert({ name: "mimir", age: 999 });
}
function seedData() {
  var users = db.getCollection("users");

  users.insert({ name: "odin", gender: "m", age: 1000, tags : ["woden", "knowlege", "sorcery", "frenzy", "runes"], items: ["gungnir"], attributes: { eyes: 1} });
  users.insert({ name: "frigg", gender: "f", age: 800, tags: ["foreknowlege"], items: ["eski"] });
  users.insert({ name: "thor", gender: "m", age: 35, items: ["mjolnir", "beer"] });
  users.insert({ name: "sif", gender: "f", age: 30 });
  users.insert({ name: "loki", gender: "m", age: 29 });
  users.insert({ name: "sigyn", gender: "f", age: 29 });
  users.insert({ name: "freyr", age: 400 });
  users.insert({ name: "heimdallr", age: 99 });
  users.insert({ name: "mimir", age: 999 });
}
function seedData ( ) { var users = db . getCollection ( "users" ) ; users . insert ( { name : "odin" , gender : "m" , age : 1000 , tags : [ "woden" , "knowlege" , "sorcery" , "frenzy" , "runes" ] , items : [ "gungnir" ] , attributes : { eyes : 1 } } ) ; users . insert ( { name : "frigg" , gender : "f" , age : 800 , tags : [ "foreknowlege" ] , items : [ "eski" ] } ) ; users . insert ( { name : "thor" , gender : "m" , age : 35 , items : [ "mjolnir" , "beer" ] } ) ; users . insert ( { name : "sif" , gender : "f" , age : 30 } ) ; users . insert ( { name : "loki" , gender : "m" , age : 29 } ) ; users . insert ( { name : "sigyn" , gender : "f" , age : 29 } ) ; users . insert ( { name : "freyr" , age : 400 } ) ; users . insert ( { name : "heimdallr" , age : 99 } ) ; users . insert ( { name : "mimir" , age : 999 } ) ; }
example-specific seeding of user data
example - specific seeding of user data