0

How do I get information from a number named object inside another object?

I have tried console.log(obj.6.4) but it does not work.

This is my object:

var obj = {
    0: {0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0},
    1: {0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0},
    2: {0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0},
    3: {0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0},
    4: {0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0},
    5: {0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0},
    6: {0:0, 1:0, 2:0, 3:0, 4:'hi', 5:0, 6:0, 7:0, 8:0, 9:0},
    7: {0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0},
    8: {0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0},
    9: {0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0}
}
Tetsuya Yamamoto
  • 24,297
  • 8
  • 39
  • 61

1 Answers1

0

Like so:

console.log(obj[6][4]);
J Livengood
  • 2,729
  • 1
  • 12
  • 26