leta=[{name:"1",status:"1"},{name:"2",status:"1"},{name:"3",status:"2"},{name:"4",status:"2"},{name:"5",status:"3"},{name:"6",status:"bbb"}]{'1':[{name:"1",status:"1"},{name:"2",status:"1"}],'2':[{name:"3",status:"2"},{name:"4",status:"2"}],'3':[{name:"5",status:"3"}],'bbb':[{name:"6",status:"bbb"}]}用ES6如何把上面的变成下面这种结构,萌新求救。就是把status提出来当下面的键值。
人到中年有点甜
MMMHUHU
相关分类