I am working on hyperledger fabric.I want to access the 'eventEmitted' field in transaction history of hyperledger fabric.
/*transaction history*/
"transactionType": "com.acn.hps.aops.ims.addingEvidence",
"eventsEmitted": [
{
"$class": "com.acn.hps.aops.ims.BasicEvent",
"evidenceId": "100",
"eventId":
"b66fd1c38754519339172905d916497376029ad9620ba5f19999fb73cf1d8b58#0",
"timestamp": "2018-03-01T08:36:41.164Z"
}
]
I was able to query the Transaction type and got the result, but now to access the evidence id field in eventEmitted how the query will be if i pass _$evidenceId and it matches with the field evidenceId in eventEmitted
query showEvidenceAllHistorians {
description: "get all assetDoc transactions"
statement: SELECT org.hyperledger.composer.system.HistorianRecord
WHERE (transactionType == 'com.acn.hps.aops.ims.addingEvidence')
}
something like: (this is based on the
trade-network
as a sample from our sample-networks on Github:I do not know CONTAINS is not the answer you want? But you can give it a try