with open('data.txt', 'r') as f:
    data = json.load(f)
rating = [summary['rating'] for summary in data['data'][
    'playerStatSummaries']['playerStatSummarySet'] if summary[
    'playerStatSummaryType'] == 'RankedSolo5x5'][0]
JSON in Python: How do I get specific parts of an array?