I am trying to create hyperledger chaincode using nodejs and fabric-shim is new to me. I am trying to fetch history of an asset using getHistoryForKey().
getHistoryForKey()
I
You can find an example about how to use getHistoryForKey in the official Hyperledger Fabric samples ( chaincodes/marbles02).
getHistoryForKey
https://github.com/hyperledger/fabric-samples/blob/release-1.4/chaincode/marbles02/node/marbles_chaincode.js