got table to json out of database