问题
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