当前位置:网站首页>Js--- get the data with the same key value in the object array to get a new array

Js--- get the data with the same key value in the object array to get a new array

2022-06-26 09:27:00 bidepanm

var data = [{name:1, value:11},{name:2,value:22}];
var b = data.map(item =>{
    return item.name
})
// [1, 2]
原网站

版权声明
本文为[bidepanm]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206260852082335.html