Created
April 10, 2012 19:01
-
-
Save redteam-snippets/2353695 to your computer and use it in GitHub Desktop.
Javascript: Get JSON Key / Values From Array of JSON Objects
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 headers = [ | |
{"Authentication" : "AUTH_KEY"}, | |
{"rememberMe" : true} | |
]; | |
// =============================================================== | |
for (var i = 0, j = headers.length; i < j; i = i + 1) { | |
Object.keys(headers[i]).forEach(function (header) { | |
console.log(header + ' = ' + headers[i][header]); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment