I'd like to update a document using Design Documents. I use PHP-on-Couch and call the design document like this:
$client->updateDoc("updateDocumentInfo", "infoUpdate", array(...), $docid);
The necessary information for the update are inside the array() statement. However, I can't figure out how to access the array inside my design document:
{
"_id": "_design/updateDocumentInfo",
"_rev": "...",
"updates": {
"infoUpdate": "function(doc, req) {doc.Name = ......; var message = 'test'; return [doc, message];}"
}
}
Does somebody know how I access an array inside this document?
Best regards