Created
October 24, 2016 05:14
-
-
Save Sysetup/5025b45f18d1034590105c69f96c6150 to your computer and use it in GitHub Desktop.
Ways to print JSON per console
This file contains hidden or 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 http = require("http"); | |
//Ways to print JSON per console: | |
console.log('http: '+http); | |
console.log(JSON.stringify(http, null, 4)); | |
console.log(JSON.parse(JSON.stringify(http, null, 4))); | |
console.dir(http.METHODS); | |
for (i in http.METHODS) { | |
console.log(http.METHODS[i]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment