I cannot get Javascript to filter a dynamically created array, although it filters a static array fine. Code block #1 works (static array), code block #2 doesn\'t (dynamically
Or, we can actually do
Array.prototype.filter.call(_eventsArray, function(_calendarEvent) { return _calendarEvent.unit == _unitValue; });