JSON response from the server and I need to filter with the date(year) before to show client-side
example
person = [{ name: String, birth: Date }]
function fltr(name, year){
return person.filter(res => ( res.name == name && res.birth.getFullYear() === year) )
}
fltr('jon', 1990 );
added getFullYear() in condition res.birth.getFullYear()
to match with year but not working , Please correct me
Please