Api w/ difficult JSON structure

Hey everyone, looking for some help!

I’m trying to make an api call and am having trouble w/ the structure of the JSON it’s returning. Here’s what it looks like:

{
“2103”: {
“rotowire_id”: 9866,
“practice_description”: null,
“college”: “Temple”,
“practice_participation”: null,
“position”: “OT”,
“high_school”: null,
“number”: 60,
“stats_id”: null,
“yahoo_id”: 27841,
“height”: “6’5"”,
“search_full_name”: “codybooth”,
“weight”: “285”,
“injury_notes”: null,
“espn_id”: 17054,
“rotoworld_id”: null,
“age”: 27,
“fantasy_positions”: [
“OL”
],
“birth_date”: “1991-04-22”,
“search_last_name”: “booth”,
“news_updated”: null,
“team”: null,
“injury_status”: null,
“first_name”: “Cody”,
“fantasy_data_id”: 16426,
“years_exp”: 1,
“full_name”: “Cody Booth”,
“search_first_name”: “cody”,
“injury_body_part”: null,
“birth_city”: null,
“hashtag”: “#CodyBooth-NFL-FA-60”,
“injury_start_date”: null,
“birth_state”: null,
“active”: false,
“depth_chart_order”: null,
“gsis_id”: null,
“birth_country”: null,
“player_id”: “2103”,
“depth_chart_position”: null,
“sport”: “nfl”,
“sportradar_id”: “4cd4976e-e230-4935-ad3f-c12876a41350”,
“status”: “Inactive”,
“last_name”: “Booth”,
“search_rank”: 9999999
},
“6250”: {
“rotowire_id”: null,
“practice_description”: null,
“college”: null,
“practice_participation”: null,
“position”: “DT”,
“high_school”: null,
“number”: 0,
“stats_id”: null,
“yahoo_id”: 32538,
“height”: “”,
“search_full_name”: “eurndrausbryant”,
“weight”: “”,
“injury_notes”: null,
“espn_id”: 3916426,
“rotoworld_id”: null,
“age”: null,
“fantasy_positions”: [
“DL”
],
“birth_date”: null,
“search_last_name”: “bryant”,
“news_updated”: null,
“team”: null,
“injury_status”: null,
“first_name”: “Eurndraus”,
“fantasy_data_id”: 21183,
“years_exp”: 0,
“full_name”: “Eurndraus Bryant”,
“search_first_name”: “eurndraus”,
“injury_body_part”: null,
“birth_city”: null,
“hashtag”: “#EurndrausBryant-NFL-FA-0”,
“injury_start_date”: null,
“birth_state”: null,
“active”: true,
“depth_chart_order”: null,
“gsis_id”: null,
“birth_country”: null,
“player_id”: “6250”,
“depth_chart_position”: null,
“sport”: “nfl”,
“sportradar_id”: “9ff46edb-988f-4c8a-ad56-0502808ca1a6”,
“status”: “Inactive”,
“last_name”: “Bryant”,
“search_rank”: 9999999
},

etc… it’s a big file.

My problem is that when I initialize the call Bubble wants to call each of these elements their own “type”, when really I want it to capture each of the descriptions inside the element.

(sorry if i’m using the wrong terms :slight_smile: )

I’ve seen some people have similar problems & work around it, but can’t quite get it to work myself. Anyone have an idea?

Thanks!

1 Like