Vue traverses the substitution array

first of all, there is such a piece of data

list["zhangsan","lisi","wangmazi"]
people[
  {
    name: "zhangsan",
    username: ""
  },{
    name: "lisi",
    username: ""
  },{
    name: "wangmazi",
    username: ""
  }
]

then the question arises: how can all the data in list be replaced with the corresponding Chinese names in people ?


list = list.map(item => {
        people.forEach(ele => {
          if (item === ele.name) {
            item = ele.username
          }
        })
        return item
      })
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-1b9d66b-2f39e.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-1b9d66b-2f39e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?