using $.grep instead of native [].filter