Skip to content

Instantly share code, notes, and snippets.

@dedosmedia
Created March 3, 2016 02:06
Show Gist options
  • Save dedosmedia/2de2c626dabf8495e213 to your computer and use it in GitHub Desktop.
Save dedosmedia/2de2c626dabf8495e213 to your computer and use it in GitHub Desktop.
Filtrar los elementos de un array de objetos, segun un valor
options = $.grep(body, function(value, i) {
return ( value.categoria == current_categoria );
});
// retorna solo los elementos del arreglo cuya categorìa sea = a current_categoria
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment