How to print object in Node JS
Basic console.log will not go through long and complex object, and may decide to just print [Object] instead. A good way to prevent that in node.js is to use util.inspect: ‘use strict’; const util = require(‘util’), obj = /*Long and complex object*/; console.log(util.inspect(obj, {depth: null})); //depth: null tell util.inspect to open everything until it get … Read more