小程序获取data中json格式的某个属性值


signlist: [{
        id: 0,
        title: '星期一',
        active: ""
      },
      {
        id: 1,
        title: '星期二',
        active: ""
      },
      {
        id: 2,
        title: '星期三',
        active: ""
      },
      {
        id: 3,
        title: '星期四',
        active: ""
      },
      {
        id: 4,
        title: '星期五',
        active: ""
      },
      {
        id: 5,
        title: '星期六',
        active: ""
      },
      {
        id: 6,
        title: '星期日',
        active: ""
      },
    ],

 

 let arr = that.data.signlist;
        for (var i = 0, len = arr.length; i < len; i++) {
          console.log(arr[i].active)
        }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM