Optimize $.grep in 2.x by using native Array.filter method