对象array的
Statement:[
{
"date": "12-09-19 11:02:47",
"Country": "Bangladesh",
"Profession": "X",
"Salary": "100",
},
{
"date": "12-09-19 11:02:47",
"Country": "Bangladesh",
"Profession": "Y",
"Salary": "101",
},
{
"date": "12-09-19 11:02:47",
"Country": "Bangladesh",
"Profession": "Z",
"Salary": "102",
},
{
"date": "11-09-19 11:02:47",
"Country": "India",
"Profession": "I",
"Salary": "103",
},
{
"date": "11-09-19 11:02:47",
"Country": "India",
"Profession": "J",
"Salary": "104",
},
{
"date": "10-09-19 11:02:47",
"Country": "Nepal",
"Profession": "N",
"Salary": "105",
},
{
"date": "10-09-19 11:02:47",
"Country": "Nepal",
"Profession": "M",
"Salary": "106",
}
]
我正在尝试创建一个新的array,它将创建一个object包含每个日期(作为键)和同一object.
新数组应如下所示:
"10-09-19": [
{
"Country": "Nepal",
"Profession": "M",
"Salary": "106",
},
{
"Country": "Nepal",
"Profession": "N",
"Salary": "105",
}
],
"11-09-19": [{
"Country": "India",
"Profession": "J",
"Salary": "104",
},
{
"Country": "India",
"Profession": "I",
"Salary": "103",
}
],
"12-09-19": [{
"Country": "Bangladesh",
"Profession": "x",
"Salary": "104",
},
{
"Country": "Bangladesh",
"Profession": "y",
"Salary": "103",
},
{
"Country": "Bangladesh",
"Profession": "z",
"Salary": "102",
}
]
肥皂起泡泡
慕村225694
拉丁的传说
开心每一天1111
相关分类