writeDBResultsToJson function

Write DQD results database table to json