Sunday, July 1, 2012

add something and get it back in Mongo, real easy

j = {name: "mongo"};
db.things.save(j);
db.things.find();

...should bring back to you something like this...

{ "_id" : ObjectId("4fee19344b6e18012aa6c5bf6"), ""name" : "mongo" }

No comments:

Post a Comment