Guest User

Untitled

a guest
Mar 17th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. var jsonDATA = JObject.Parse(data);
  2.  
  3. foreach (var e in jsonDATA["events"]) {
  4. //in this step, the result is JSON below
  5. var id = e["info"]["id"];` // error: cannot access child value on newtonsoft json linq jproperty
  6. }
  7.  
  8. {"5aa891cd1e1422452e8b4567": {
  9. "info": {
  10. "id": "5aa891cd1e1422452e8b4567",
  11. "event_id": "58911142245284567",
  12. "name": "Santos Laguna vs Queretaro",
  13. "sport": "Soccer",
  14. "league": "Mexico Cup",
  15. "period": "Finished",
  16. "score": "1:0",
  17. "status": "Live",
  18. "start_time": "2018.03.14 03:06:53",
  19. "state": 1017,
  20. "state_name": "Fulltime",
  21. "minute": 90,
  22. "safe": false,
  23. "safe2": false,
  24. "blocked": false,
  25. "stop": false
  26. },
  27. "stats": {
  28. "home": {
  29. "name": "Santos Laguna",
  30. "color": "",
  31. "position": "",
  32. "on_target": "",
  33. "off_target": "",
  34. "attacks": "",
  35. "dangerous_attacks": "",
  36. "possession": "",
  37. "goals": 1,
  38. "corners": 5,
  39. "yellowcards": 1,
  40. "redcards": 0,
  41. "throwins": 0,
  42. "freekicks": 0,
  43. "goalkicks": 0,
  44. "penalties": 0,
  45. "substitutions": 3,
  46. "ht_result": 1
  47. },
  48. "away": {
  49. "name": "Queretaro",
  50. "color": "",
  51. "position": "",
  52. "on_target": "",
  53. "off_target": "",
  54. "attacks": "",
  55. "dangerous_attacks": "",
  56. "possession": "",
  57. "goals": 0,
  58. "corners": 8,
  59. "yellowcards": 3,
  60. "redcards": 1,
  61. "throwins": 0,
  62. "freekicks": 0,
  63. "goalkicks": 0,
  64. "penalties": 0,
  65. "substitutions": 3,
  66. "ht_result": 0
  67. }
  68. },
  69. "odds": []
  70. }}
Add Comment
Please, Sign In to add comment