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,}]