data fetched from the background
[
{
date: "12-01",
name: "a",
rank: "111"
},
{
date: "12-01",
name: "b",
rank: "112"
},
{
date: "12-02",
name: "c",
rank: "100"
},
{
date: "12-04",
name: "a",
rank: "104"
},
{
date: "12-04",
name: "b",
rank: "112"
}
]
there are duplicates and vacancies. I would like to fill in all the dates of the vacancy, such as the following:
if rank does not have data, fill in "-"
[
{
date: "12-01",
name: "a",
rank: "111"
},
{
date: "12-01",
name: "b",
rank: "112"
},
{
date: "12-01",
name: "c",
rank: "-"
},
{
date: "12-02",
name: "a",
rank: "-"
},
{
date: "12-02",
name: "b",
rank: "-"
},
{
date: "12-02",
name: "c",
rank: "100"
},
{
date: "12-04",
name: "a",
rank: "104"
},
{
date: "12-04",
name: "b",
rank: "112"
},
{
date: "12-04",
name: "c",
rank: "105"
}
]
what should I do with this?