I am hitting api endpoint that returns a json string. I need to take that json string and populate a C# DATATABLE. How is this achieved?
This is the code I have to get the JSON...
[HttpGet]
public IActionResult DTL()
{
var data = _context.TC.FromSqlRaw("Select * from employeeInfo order by employeeID Asc").ToList();
//I need data converted to a DataTable C#
}
How do this happen with C# code?
EDIT
This is what my JSON data returned looks like:
{"data":[{"empName": "Jason", "empManager": "Richard", "userID": "ja123"}]}
>(json);`
– Clint Dec 20 '19 at 17:13