Say the object is in an array, called data . data.map(d => ({ key: d.key, perstate: { [d.values.state]: d.values.cases } })).
確定! 回上一頁