My JSON
{
"RECORDS": [
{
"Id": 23040035705987,
"arriveddate": "2015/04/24",
"expirationDate": null,
"replacedDate": null,
"processDate": "2015/04/24"
},
{
"Id": 23070041800654,
"arriveddate": "2015/04/24",
"expirationDate": null,
"replacedDate": null,
"processDate": "2015/04/27"
},
{
"Id": 23040035705984,
"arriveddate": "2015/04/24",
"expirationDate": null,
"replacedDate": null,
"processDate": "2015/04/24"
},
{
"Id": 23040035705983,
"arriveddate": "2015/04/24",
"expirationDate": null,
"replacedDate": null,
"processDate": "2015/04/24"
}
],
}
Expected Object
{
"processDate": [
"2015/04/24",
"2015/04/27"
],
"Id": [
[
23040035705983,
23040035705984,
23040035705987
],
[
23070041800654
]
]
}
i need to do a mapping based on the process date like in my expected object i have two dates which are the unique dates of all my JSON and in the next ids i have each id which belongs to that corresponding process dates right now i have been able to get the unique process dates but in the next ids i am not able to do can you please provide an example as to how i should loop through to achieve the same in angular
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…