Good afternoon, my query is if I have a value type Date
and an array where its values are also type Date
: is it possible to perform a search to see if there are matches? .
I'm doing the following:
// time = Sun Dec 13 2015 21:00:00 GMT-0300 (Hora est. Sudamérica Pacífico)
var busqueda = _.findWhere(this.events,{startsAt:moment(time).toDate()});
return !!busqueda;
The array contains:
0: Object
$id: 0
$priority: null
endsAt: Sun Dec 13 2015 21:15:00 GMT-0300 (Hora est. Sudamérica Pacífico)
startsAt: Sun Dec 13 2015 21:00:00 GMT-0300 (Hora est. Sudamérica Pacífico)
title: "titulo: 14.12.2015 00:00 - 14.12.2015 00:15"
type: "info"
__proto__: Object
So far this only returns undefined
.