#couchdb #fabric-chaincode #fabric-chaincode #couchdb


How to use map reduce functions in Chaincode written in Node js?

I am saving data into couch db in the following format :
1. users collection : {
"name":"test user",
 documents collection:
"documentName":"Test Document",

I want to query documents along with the user references into it like this:
{"documentname":"Test Document",
"user":{ "userId":101,"name:"test user""}

From my reading on the couch db literature it is possible with map reduce functions. 

 How to use  this map reduce functions  in chain code?

Join {fabric@lists.hyperledger.org to automatically receive all group messages.