You are talking about the InDesign DOM, not JSON, correct?
Most InDesign objects are probably XPath or something based objects, not iterable. To make it easier to iterate, change them to static array like this. Then you can use map, filter, and other useful features.
const cellsArray = myTable.cells.everyItem().getElements() ;
I expect that myTable.cell[2]
would work if changed as follows.
myTable.cells[2] ; // cell**s**