现有数组
const r = [
{
date: "2020-12",
regNum: "0"
},
{
date: "2021-1",
regNum: "1"
},
{
date: "2021-2",
regNum: "10"
}
]
目标数组
const a = ["2020-12","2021-1","2021-2"]
const b = [0,1,10]
const a = r.map(o=>o.date)
const b = r.map(o=>Number(o.regNum))