Created
July 10, 2014 16:05
-
-
Save rodriguezartav/8ee0913c2a81f859df5f to your computer and use it in GitHub Desktop.
Get unique attributes from data items
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var productos = Producto.all(); | |
var marcas = []; | |
for (var i = productos.length - 1; i >= 0; i--) { | |
var marca = productos[i].marca; | |
if(marcas.indexOf(marca) == -1 ) marcas.push(marca); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment