Hmm $.grep looks good. Will use that instead.