title: Getting world state by value
body: <p>I'm new to blockchain and working with hyperledger fabric (v:0.6 for now) to create an application for learning perspective. </p>
  
  <p>I'm keeping a ledger of financial transactions on blockchain, soon as a transaction takes place (A web based component notifies on transaction occurrence and calls the chaincode).</p>
  
  <p>The structure of transactions looks something like this:</p>
  
  <pre><code>type Transactions struct { 
      ReferenceNumber string `json:"ReferenceNumber"`
      BillNumber string `json:"BillNumber"`
      BillingCompany string `json:"BillingCompany"`
      Amount string `json:"Amount"`
      Status string `json:"Status"`
  }
  </code></pre>
  
  <p>I json marshal this and save it to state with ReferenceNumber as the key.</p>
  
  <p>Now I can get the transaction from state on the basis of ReferenceNumber. But what if I want to get the transaction from state on the basis of let's say 'Status' like how many transactions on the ledger have status as 'reconciled'.</p>
  
  <p>Is there any way to query state not on the basis of key but value?</p>