I have 2 documents in my collection, the expected result is to get an array of 2 different values, but every time I get an array of 3 or 5 values which some of them are duplicated.
this is my code :
getAllDrops(date: string) {
this.campaignService.getAllCampaigns().subscribe((res) => {
res.forEach((campaign) => {
campaign.drops.forEach((drop) => {
if (drop.dropDate === date) {
this.dropsVolumeArray.push(drop.dropVolume);
}
});
});
});
the result when I print dropsVolumeArray in the console :
Any help ?

