For loop is only outputs the marketids, for the last set of races of JSON file. I think this is because of the if statement preceding the for a loop. Does anyone know how can I continue looping whilst keeping the if statement?
[{'venueName': 'Geelong',
'raceDay': '2020-01-02 00:00:00',
'country': 'AUS',
'raceType': 'R',
'meetingId': '29637049',
'markets': [{'marketId': '166897895',
'raceNo': '1',
'startTime': '2020-01-02 02:00:00',
'marketStatus': 'CLOSED',
'eventName': 'Port Water Bouy Mdn Plate',
'nzToteEventId': '287012'},
{'marketId': '166897897',
'raceNo': '2',
'startTime': '2020-01-02 02:30:00',
'marketStatus': 'CLOSED',
'eventName': 'Portarlington Beach Motel Mdn',
'nzToteEventId': '287013'},
{'marketId': '166897899',
'raceNo': '3',
'startTime': '2020-01-02 03:00:00',
'marketStatus': 'CLOSED',
'eventName': 'Flash Fabrications Mdn Plat3',
'nzToteEventId': '287014'},
{'marketId': '166897901',
'raceNo': '4',
'startTime': '2020-01-02 03:30:00',
'marketStatus': 'CLOSED',
'eventName': 'Race With Empower Racing Mdn',
'nzToteEventId': '287015'},
{'marketId': '166897903',
'raceNo': '5',
'startTime': '2020-01-02 04:00:00',
'marketStatus': 'CLOSED',
'eventName': 'Absolute Landscapes Mdn Plate',
'nzToteEventId': '287016'},
{'marketId': '166897905',
'raceNo': '6',
'startTime': '2020-01-02 04:30:00',
'marketStatus': 'CLOSED',
'eventName': 'Ajk Builders (Bm64)',
'nzToteEventId': '287017'},
{'marketId': '166933411',
'raceNo': '7',
'startTime': '2020-01-02 05:00:00',
'marketStatus': 'CLOSED',
'eventName': 'Batman Mgmt Bellarine Cup-Bm64',
'nzToteEventId': '287018'},
{'marketId': '166897909',
'raceNo': '8',
'startTime': '2020-01-02 05:30:00',
'marketStatus': 'CLOSED',
'eventName': 'Gj Bradding Heating&Cool.-Bm58',
'nzToteEventId': '287019'},
{'marketId': '166897911',
'raceNo': '9',
'startTime': '2020-01-02 06:00:00',
'marketStatus': 'CLOSED',
'eventName': 'Bayshore Electrical (Bm58)',
'nzToteEventId': '287020'}]},
{'venueName': 'Mount Barker',
'raceDay': '2020-01-02 00:00:00',
'country': 'AUS',
'raceType': 'R',
'meetingId': '29636945',
'markets': [{'marketId': '166892549',
'raceNo': '1',
'startTime': '2020-01-02 05:17:00',
'marketStatus': 'CLOSED',
'eventName': 'Happy New Year Mdn',
'nzToteEventId': ''},
{'marketId': '166892551',
'raceNo': '2',
'startTime': '2020-01-02 05:52:00',
'marketStatus': 'CLOSED',
'eventName': 'Langton Mdn',
'nzToteEventId': ''},
{'marketId': '166892553',
'raceNo': '3',
'startTime': '2020-01-02 06:32:00',
'marketStatus': 'CLOSED',
'eventName': 'McDonald Hcp (C2)',
'nzToteEventId': ''},
{'marketId': '166892555',
'raceNo': '4',
'startTime': '2020-01-02 07:10:00',
'marketStatus': 'CLOSED',
'eventName': 'Hicks Hcp (C2)',
'nzToteEventId': ''},
{'marketId': '166892557',
'raceNo': '5',
'startTime': '2020-01-02 07:45:00',
'marketStatus': 'CLOSED',
'eventName': 'Lowood (Bm58+)',
'nzToteEventId': ''}]}]