Saving JSON object in CouchDB from JavaScript

本小妞迷上赌 提交于 2019-12-13 17:13:15

问题


I am retrieving a form value in JavaScript and converting it to a JSON object using JSON.stringify().

Now I want to save it in CouchDB. Can anyone tell how to do that?


回答1:


I think it was:

var json = {_id:1 friends:["friend1","friend2"]}
couchdb.save(json);
var friends = couchdb.open(1).friends;

Hope that could help you.



来源:https://stackoverflow.com/questions/10570062/saving-json-object-in-couchdb-from-javascript

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!