0
配列を並べ替えるとマップは使えません。配列をAxiosから並べ替える
var arrQuestByDate = new Array();
action.payload.data.forEach(function(item){
if(typeof(arrQuestByDate[item.date])==='undefined'){
arrQuestByDate[item.date]= new Array();
}
arrQuestByDate[item.date].push(item);
console.log(arrQuestByDate[item.date].length) //this output good value
})
console.log(arrQuestByDate.length) //this output 0
私は、配列の長さは、あなたがlodashからgroupBy機能を使用することができます0
大括弧の構文はオブジェクトであり、配列ではありません。 –
コード全体を投稿する必要があります... – assembler
「arrQuestByDate [item.date]」とは何ですか? –