Skip to content

Instantly share code, notes, and snippets.

@sergiopvilar
Created April 15, 2014 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergiopvilar/10765405 to your computer and use it in GitHub Desktop.
Save sergiopvilar/10765405 to your computer and use it in GitHub Desktop.
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)
}
arr = livros.map &:titulo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment