页面倒序遍历map集合
后台得到的数据是:
{201810=[], 201809=[], 201808=[]}
小程序那打印的数据是
{201808: Array(0), 201809: Array(0), 201810: Array(0)}
它把后台的顺序给正过来了
页面遍历map的代码
< view wx:for = '{{summaryLst}}' wx:for-index = 'key' class = 'mainview' > < view class = 'spacebetween' > < text class = 'dateview' >{{key}}</ text > < text class = 'addview' >+ 添加</ text > </ view > < view class = 'form-view' > < view wx:for = '{{item}}' wx:for-item = 'item2' class = 'form-view-row spacebetween' > </ view > </ view > </ view > |
怎么样能让页面倒序输出map集合呢