二次遍历数组-

Posted wen-

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了二次遍历数组-相关的知识,希望对你有一定的参考价值。

// 区域 0 未选中当前地区 1:未选中
jgArea: [{
id: "001",
areaName: "顺庆",
active: "true",
banks: [{
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点1",
zhi: "支出网点1",
},
{
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点2",
zhi: "支出网点2",

},
{
bankname: "农业银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点3",
zhi: "支出网点3",

}
]
},
{
id: "002",
areaName: "嘉琳",
active: "false",
banks: [{
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点1",
zhi: "支出网点1",

}, {
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点2",
zhi: "支出网点2",

}, {
bankname: "农业银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点3",
zhi: "支出网点3",

}]
},
{
id: "003",
areaName: "高坪",
active: "false",
banks: [{
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点1",
zhi: "支出网点1",

}, {
bankname: "建设银行",
accountname: "多少是多少",
account: "324",
cun: "存入网点2",
zhi: "支出网点2",

}]
}
]

<block wx:for="{{jgArea}}" wx:key="{{jgArea.bank}}" wx:for-item="itemName">
<view data-item="{{itemName}}">
<view class="title">
<view class="left">{{itemName.areaName}}</view>
</view>
<block data-item="{{itemName}}" wx:for="{{itemName.banks}}" wx:for-item="item" wx:key="{{itemName.banks.account}}">
<view class="weui-cell " data-item="{{item}}" bindtap="toDetail">
<view class="weui-cell__bd">{{item.bankname}}</view>
<view class="weui-cell__ft">
<i-icon type="enter" size="28" />
</view>
</view>
</block>
</view>
</block>

以上是关于二次遍历数组-的主要内容,如果未能解决你的问题,请参考以下文章

PHP遍历键值对数组

js 数组遍历时删除元素

Numpy如何遍历数组的列?

js的Dom对象集合循环遍历过程中数组长度发生变化,小白不懂,求大神指教

遍历Java中的字符串数组

java数组遍历赋值,最终入职阿里