current position:Home>The problem of obtaining the variable value in the structure state in the contract by web3js

The problem of obtaining the variable value in the structure state in the contract by web3js

2022-02-03 22:50:37 Q & A of Denglian community

The third function normally obtains , The first and second have always been [object Object].image.png Structure information image.png Structure variable information image.png

web3js Get writing in image.png To get the results image.png I don't know where the problem is , Urgent solution ? Teachers , Help the children !




Take the answer 1:

Because what we get is an array object , You need to use subscripts result[0], result[1] Get the corresponding value .




copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032250349149.html

Random recommended