How WeChat Mini Programs modifies the value of data in traversal

data: {
    personData:[100,200,300,400,500,600]
},
onLoad: function(options) {
    this.Limit()
},
limit(){
    var _this=this;
      this.data.personData.forEach(item=>{
      if (item>400) {
        400
      }
   })
}

there is something I don"t quite understand when I just came into contact with WeChat Mini Programs, that is, I need to modify items greater than 400 in the above forEach. WeChat Mini Programs needs to call this.setData (), but gets the global content. How to use this to modify it as in js

Mar.07,2021

you can first save the processed value with a variable, reprocess it all, and then reassign the setData.

limit(){
    var _this=this;
    var temp = []
      this.data.personData.forEach(item=>{
      if (item>400) {
        temp.push(item) //400,setData
      }
   })
    this.setData({personData:temp})
}

this.setData({
    ["personData.0"]: "0"
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b379f8-4ed12.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b379f8-4ed12.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?