106
65

More than 5 years have passed since last update.

console.logでJSON形式の値が[object Object]になる時

Last updated at Posted at 2018-07-25

*個人の記録用

こういうとき
console.log(value);
→[object Object]
中身を文字列化する
console.log(JSON.stringify(value));{"type":"THE_WORLD","dio":"WRYYYYY"}

@indometacinさん、コメントありがとうございます!
console.dirを使ってもJSON形式の値が確認できます。

console.dirでJSONの中身を確認する
console.dir(value);
→Object {type: "THE_WORLD", dio: "WRYYYYY"}
106
65
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
106
65