nebulasio / wiki

This repository is out of date, please check the new wiki:
http://wiki.nebulas.io/en/latest/
GNU General Public License v3.0
421 stars 154 forks source link

获取合约内所有数据的方法 #142

Closed zeroGaozj closed 6 years ago

zeroGaozj commented 6 years ago

有获取合约内所有内容的方法吗? 比如有一个get方法可以根据num属性get(num)查找相关数据,怎么获取所有的数据呢?

yupnano commented 6 years ago

这个需要自己实现,可以参考tutorial中的Map数据遍历,用两个map实现类似数组的功能,分别定义map(index,key)和map(key,value),这样可以实现map中数据的遍历。

zeroGaozj commented 6 years ago

@yupnano 谢谢,已经解决了。