In couchdb, I need to represent some data in the following format, a outer container that references other documents inside an array.
I want to keep these documents
You can achieve this using couchdb linked documents
here is how the view will look like
function(doc){ if(doc.items) doc.items.forEach(function(item){ emit(doc._id,{_id:item}); }) }
now you can query the view with include_docs=true parameter and you should have the desired result.
include_docs=true