How to print object in Node JS

前端 未结 6 2020
忘掉有多难
忘掉有多难 2020-12-18 22:49

In the below code (running on Node JS) I am trying to print an object obtained from an external API using JSON.stringify which results in an error:

6条回答
  •  时光说笑
    2020-12-18 23:20

    You can pass two arguments to console.log()

    Try this code after installing "yargs" And it will print whole object

    console.log('object is' , yargs.argv);

    I think may be it will help you to print whole object :)

提交回复
热议问题