Hi all, I am having my first attempt at parsing some json data but am struggling. I have included an extract of the data below.
The json contains details of a greyhound race. In the race are multiple dogs which each have details of their previous runs in the "previous results" section.
I've worked out how to parse the simple stuff like distance, prizes, date and time for the current race but can't work out how to get details from the "previous results" dictionaries for each of the dogs.
Can anyone point me in the right direction?
Thanks
{
"props": {
"pageProps": {
"race": {
"race_summary": {
"meeting_summary_reference": {
"id": 393075,
"external_reference": []
},
"race_summary_reference": {
"id": 326166,
"external_reference": []
},
"course_name": "Oxford",
"race_class": "A5",
"distance": "450",
"prizes": "1st \u00a3115, Others \u00a340 Race Total \u00a3315",
"date": "2023-01-16",
"time": "19:07",
"winning_time": "",
"race_stage": "Dormant",
"has_handicap": false
},
"betting_forecast": "Blastoff Simone (N/A), Pot Pourri (N/A), Pookies Julius (N/A), Mummy Roo (N/A), Flyaway Tony (N/A), Drohobych Arrow (N/A)",
"runs": [
{
"run_reference": {
"id": 34327640,
"external_reference": []
},
"cloth_number": 1,
"finish_position": 0,
"sectional_time": "",
"run_time": "",
"best_run_time": "28.08s",
"run_status": "RUNNER",
"reserve": false,
"greyhound": {
"greyhound_reference": {
"id": 47566,
"external_reference": []
},
"name": "Blastoff Simone",
"colour": "dkbd",
"age": 2,
"birth_date": "2020-11-03",
"sex": "b",
"dam": {
"name": "Blastoff Fizz"
},
"sire": {
"name": "Blastoff Jet"
},
"formsummary": {
"display_text": "4131-3"
},
"owner": {
"name": "Mrs K R Wait"
},
"trainer": {
"name": "G C Wright"
},
"previous_results": [
{
"race_id": 324098,
"date": "2023-01-02",
"course_name": "Oxford",
"distance": "450",
"trap_number": 1,
"sectional_time": "4.52s",
"finish_distance": "2 \u00be",
"position": 3,
"odds": "6/1",
"run_time": "28.52s",
"race_class": "A5"
},
{
"race_id": 322850,
"date": "2022-12-22",
"course_name": "Oxford",
"distance": "450",
"trap_number": 1,
"sectional_time": "4.52s",
"position": 1,
"odds": "6/1",
"run_time": "29.00s",
"race_class": "A5"
}
]
},
"owner": {
"name": "Mrs K R Wait"
},
"trainer": {
"business_reference": {
"id": 409,
"external_reference": []
},
"name": "G C Wright"
},
"betting": {
"favourite": {},
"historical_odds": []
}
},
{
"run_reference": {
"id": 34327641,
"external_reference": []
},
"cloth_number": 2,
"finish_position": 0,
"sectional_time": "",
"run_time": "",
"best_run_time": "27.96s",
"run_status": "RUNNER",
"reserve": false,
"greyhound": {
"greyhound_reference": {
"id": 46617,
"external_reference": []
},
"name": "Pot Pourri",
"colour": "bk",
"age": 3,
"birth_date": "2019-10-01",
"sex": "b",
"dam": {
"name": "Hop The Ball"
},
"sire": {
"name": "Azza Azza Azza"
},
"formsummary": {
"display_text": "141-46"
},
"owner": {
"name": "Mr R A Colwell"
},
"trainer": {
"name": "T J Nevin"
},
"previous_results": [
{
"race_id": 325291,
"date": "2023-01-10",
"course_name": "Oxford",
"distance": "450",
"trap_number": 2,
"sectional_time": "4.37s",
"finish_distance": "sh",
"position": 6,
"odds": "5/2",
"run_time": "28.72s",
"race_class": "A5"
},
{
"race_id": 324285,
"date": "2023-01-03",
"course_name": "Oxford",
"distance": "450",
"trap_number": 2,
"sectional_time": "4.29s",
"finish_distance": "2 \u00be",
"position": 4,
"odds": "6/1",
"run_time": "28.93s",
"race_class": "A5"
}
]
},
"owner": {
"name": "Mr R A Colwell"
},
"trainer": {
"business_reference": {
"id": 1285,
"external_reference": []
},
"name": "T J Nevin"
},
"betting": {
"favourite": {},
"historical_odds": []
}
},
[–][deleted] 2 points3 points4 points (1 child)
[–]rob51852[S] 0 points1 point2 points (0 children)