Table not loading properly

I just noticed that you have a typo in your code. The query of the data collection returns rs as the results, but your code uses res . As an example:

"date": res['dateTime'].toDateString(),

Seems like your code has other issues that need to be fixed.