例如:
info = [
{STAFF_NAME: "1",USERNAME: "a"},
{STAFF_NAME: "2",USERNAME: "b"}
{STAFF_NAME: "3",USERNAME: "c"}
{STAFF_NAME: "4",USERNAME: "d"}
{STAFF_NAME: "5",USERNAME: "e"}
]
方法一:
info.forEach(e => {
arrnew.push(e.STAFF_NAME) })
方法二:
let arrnew = info.amp(obj=>{
return obj.STAFF_NAME
)