CouchDB: accessing nested structutes in map function

Posted by Vegar on Stack Overflow See other posts from Stack Overflow or by Vegar
Published on 2010-05-06T16:24:44Z Indexed on 2010/05/06 16:28 UTC
Read the original article Hit count: 284

Filed under:
|
|

I have a document based on a xml structure that I have stored in a CouchDB database.

Some of the keys contains namespaces and are on the form "namespace:key":

{"mykey":{nested:key":"nested value"}}

In the map function, I want to emit the nested value as a key, but the colon inside the name makes it hard...

emit(doc.mykey.nested:key, doc)   <-- will not work. 

Does anyone know how this can be solved?

© Stack Overflow or respective owner

Related posts about couchdb

Related posts about map