let a = [ { 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" }] }
use ES6 how to change the above into the following structure, cute new call for help. Is to propose status as the following key value.