How to query JSON data in chain codes stored in couchDB #fabric-chaincode


Hi All,

In my chaincodes, which stored in couchDB,  I have a data structure like this:

const order = {
   orderItems: JSON.stringify(OrderItemObj),


Where OrderItemObj is , e.g.

OrderItemObj = [
   {"itemNumber": 1, "itemName" : "Apple", "itemQty: 100},
   {"itemNumber": 2, "itemName" : "Pear", "itemQty: 200}

How can I use rich query feature of couchDB to query all orders having , e.g. itemNumber = 1 ?


Join to automatically receive all group messages.