public static List <dynamic> GetQuestions(int id) { List <dynamic> tickets = new List <dynamic>(); try { string json = serv_proxy.GetTicketChildren(id); if (json.Contains("error")) { return(null); } else { dynamic res = JsonConvert.DeserializeObject(json); foreach (dynamic ticket in res) { json = serv_proxy.GetTicket((int)ticket.id.Value); if (json.Contains("error")) { continue; } res = JsonConvert.DeserializeObject(json); tickets.Add(new { question = res.description, answer = res.answer }); } } } catch (Exception e) { tickets = null; } return(tickets); }