微信小程序 获取数组长度

wxml中直接

{{array.length}}

js中

array.length

小程序调用API返回的数据全部都是异步的;所以前提是要确保array中的数据,是存在的