private void ProcessRecords() { Task <string> pr = Task.Run <string>(async() => await PullRecords()); Records = pr.Result; DRecords = new List <RecordsViewModel>(); if (Records.StartsWith("Error:") == false) { JArray jsonVal = JArray.Parse(Records) as JArray; //dynamic CRecords = jsonVal; foreach (JObject CRecord in jsonVal) { RecordsViewModel temp = CRecord.ToObject <RecordsViewModel>(); DRecords.Add(temp); } } }