This has been answered numerous times, but for some damn reason I can't make it work in my case.
I'm parsing an Ethereum blockchain and getting a result that I am storing in a state as this.state.eventData
The data looks like this:
[
[{
"logIndex": 0,
"transactionIndex": 0,
"transactionHash": "0xec912b5811f72b9e821fd62f7c79e45c09c641bb9bf4fff3be9e4997be27cd76",
"blockHash": "0x84f988d6611ba75e8321e20abf23620d68efb0ff721b85447b8072cd5ff07525",
"blockNumber": 16,
"address": "0x985b025b6baa40c6d5c7247f4d608efdfc24b81b",
"type": "mined",
"event": "EventOne",
"args": {
"paramOne": "0x6a7a88d1f9f6250e1115d05a0489e584d0a0c7c0",
"paramTwo": "90",
"paramThree": "2",
"paramFour": "479",
"paramFive": "110123595505617976",
"paramSix": "1",
"paramSeven": true
}
},
{
"logIndex": 0,
"transactionIndex": 0,
"transactionHash": "0x776ecfd9a1efe0a0d399a4a3d56f2121d5305e4d3219c13ca4e960bcdcce460c",
"blockHash": "0x109907689e47d96a61bffc0ec4eac5cf4295361d57c9a25fe53aa68e1412eadc",
"blockNumber": 18,
"address": "0x985b025b6baa40c6d5c7247f4d608efdfc24b81b",
"type": "mined",
"event": "EventOne",
"args": {
"paramOne": "0x6a7a88d1f9f6250e1115d05a0489e584d0a0c7c0",
"paramTwo": "90",
"paramThree": "17",
"paramFour": "480",
"paramFive": "110123595505617976",
"paramSix": "2",
"paramSeven": true
}
}
]
]
I got this data by console.log(eventData) and then copying the object from the Chrome console.enter code here
I want to simply get, say, paramOne
of each object. When I'm trying to simply console.log(this.state.eventData[[0].args])
I'm getting an undefined error.
I'd appreciate your help in this struggle.