I have obtained a JSON formatted object from a Web API that contains information about NIH funding grants. Each grant provides a history of awards for a specific researcher. My goal is to display only the latest award_notice_date for each unique project_serial_num. I already have the elements sorted in descending order, which works well when using a v-for loop to render them. However, my challenge is how to selectively display only the first award notice for each project_serial_num, resulting in the data for appl_id 10372234 and 10226173 being shown. Filtering by dates is not effective because an award may have expired but still be the first one for that particular project_serial_num.
[{
"appl_id": 10372234,
"subproject_id": null,
"fiscal_year": 2022,
"project_num": "5R01CA261232-02",
"project_serial_num": "CA261232",
"award_notice_date": "2022-03-02T12:03:00Z"
},
{
"appl_id": 10226173,
"subproject_id": null,
"fiscal_year": 2021,
"project_num": "5K07CA214839-05",
"project_serial_num": "CA214839",
"award_notice_date": "2021-08-05T12:08:00Z"
},
{
"appl_id": 10253554,
"subproject_id": null,
"fiscal_year": 2021,
"project_num": "1R01CA261232-01",
"project_serial_num": "CA261232",
"award_notice_date": "2021-03-15T12:03:00Z"
},
{
"appl_id": 9989810,
"subproject_id": null,
"fiscal_year": 2020,
"project_num": "5K07CA214839-04",
"project_serial_num": "CA214839",
"award_notice_date": "2020-07-30T12:07:00Z"
}]