let arr =[ {name:'小明',sex:11},{name:'小剛',sex:12,}]
//要把name 換成 label
var newArr = JSON.stringify(arr).replace(/sex/g, "age");
var list = JSON.parse(newArr)
//console.log(list) [{name:'小明',age:11},{name:'小剛'厂镇,age:12,}]
let arr =[ {name:'小明',sex:11},{name:'小剛',sex:12,}]
//要把name 換成 label
var newArr = JSON.stringify(arr).replace(/sex/g, "age");
var list = JSON.parse(newArr)
//console.log(list) [{name:'小明',age:11},{name:'小剛'厂镇,age:12,}]