First of all fill a Datatable with some results.
Now here we are going to iterate each row and column of data table and put all of them in Dictionary
Notice that, I have created a new dictionary object for every row and finally put all of the dictionaries in Another dictionary I.E. resultMain.
In the end, I have simply Serialize the resultMain Dictionary to render JSON.