passing data from table to json method