Hi. I’m using a code to serialize a JSON into a DataTable. If i use the code on the main workflow, it works fine. If i use the same code in another workflow that is called by Invoke OpenRPA, the code doesn’t work and i get the error: “The name 'JArray” does not exist in the current context"
Is this a bug?
var jsonArray = JArray.Parse(httpResponse);
var dataTable = new DataTable();
foreach (var property in jsonArray[0].Children())
{
dataTable.Columns.Add(property.Name, typeof(string));
}
foreach (var jsonObject in jsonArray)
{
var row = dataTable.NewRow();
foreach (var property in jsonObject.Children())
{
row[property.Name] = property.Value.ToString();
}
dataTable.Rows.Add(row);
}
//dataTable.AsEnumerable().ToList().ForEach(r => Console.WriteLine(string.Join(", ", r.ItemArray)));
chamados = dataTable;