Last active
July 10, 2019 15:12
-
-
Save igoventura/cda335818fad9dff45ea22be66d3ad97 to your computer and use it in GitHub Desktop.
Object Array to Uppercase
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
Object.prototype.keys = function() { return Object.keys(this) } | |
var a = [{nome: 'igo', sobrenome: 'ventura'}, {nome: 'igo', sobrenome: 'ventura'}, {nome: 'igo', sobrenome: 'ventura'}] | |
a.map(i => { i.keys().forEach(k => i[k] = i[k].toUpperCase()); return i }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment