0

In my console, I'm getting:

{
  'a': [Circular],
  'b': [Circular],
  'c': [Circular]
}

How can I see the contents of [Circular]? I've tried console.log(), util.inspect() and console.dir() and I'm still getting [Circular] instead of the actual content.

Edit: I'm trying to see the actual content, how many layers deep it goes, etc., for debugging purposes. Linked question does not address any of that.

Scott
  • 1,207
  • 2
  • 15
  • 38
  • Possible duplicate of [In Nodejs, when I console.log a req object, what does \[Circular\] reference? How to determine that](https://stackoverflow.com/questions/6010173/in-nodejs-when-i-console-log-a-req-object-what-does-circular-reference-how) – DarkCeptor44 Oct 04 '19 at 05:00
  • I'm trying to see the actual content, how many layers deep it goes, etc., for debugging purposes. Linked question does not address any of that. – Scott Oct 04 '19 at 05:03

1 Answers1

0

Basically that's recursion, as far as I know there is no way to possibly log a [Circular] reference (don't quote me on that), but if you could it would probably be like this:

{
  'a': {
    'a': {
      'a':{
        // never ending
      }
    }
  }
}
DarkCeptor44
  • 184
  • 3
  • 15