Created
April 15, 2014 19:50
-
-
Save sergiopvilar/10765405 to your computer and use it in GitHub Desktop.
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
livros = [ | |
// Titulo | |
{ | |
titulo: 'Teste 1' | |
}, | |
{ | |
titulo: 'Teste 2' | |
} | |
]; | |
// Código que vai ser comparado no Ruby | |
var arr = []; | |
for(var i in livros){ | |
arr.push(livros[i].titulo) | |
} |
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
arr = livros.map &:titulo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment