{"blog_title":"yohtn","image_url":null,"version":"1.0","categories":["JavaScript","mongoDB"],"width":"100%","url":"https://yohtn.hatenablog.com/entry/2013/09/12/171333","author_name":"yutaono","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohtn.hatenablog.com%2Fentry%2F2013%2F09%2F12%2F171333\" title=\"Mongoose\u3092\u3064\u304b\u3063\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u66f4\u65b0 - yohtn\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/yutaono/","type":"rich","provider_url":"https://hatena.blog","title":"Mongoose\u3092\u3064\u304b\u3063\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u66f4\u65b0","height":"190","blog_url":"https://yohtn.hatenablog.com/","published":"2013-09-12 17:13:33","description":"MongoDB\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30e2\u30c7\u30ea\u30f3\u30b0\u30c4\u30fc\u30eb\u3067\u3042\u308bMongoose\u3092\u3064\u304b\u3063\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u66f4\u65b0\u65b9\u6cd5\u3067\u3059\u3002User\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306euser_id\u304c\"001\"\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u4e00\u3064\u306b\u5bfe\u3057\u3066\u3001user_name\u3092\"user2\"\u306b\u5909\u66f4\u3057\u307e\u3059\u3002 db.User.findOne( { user_id: \"001\" }, function(err, doc) { if(err || doc===null) { return false; } doc.user_name = \"usr2\"; doc.save(); }"}