I have an array of objects called seasons of length 300, and I trying to search through a certain property "Date" and add it to an array if it has not been found before. So far I have
var day=[];
for (var i=1; i<300; i++) {
var found=false;
for (var j=0; j<day.length; j++) {
if (day[j]==seasons[i]["Date"]) {
found=true;
break;
}
if (!found) {
day[day.length]=seasons[i]["Date"];
}
}
}
I'm not too sure where this is going wrong, and would appreciate some help. Thanks