Let's say I'm getting some JSON in the format of...
"fellowPlayers": [ { "championId": 110, "teamId": 100, "summonerId": 34258805 }, { "championId": 9, "teamId": 100, "summonerId": 19923759 },
{ "championId": 46, "teamId": 200, "summonerId": 2112359 },
... ]
...that can have a variable # of entries (from 0-11, inclusive), but each entry has those 3 attributes, 2 of which should map to other tables (championId and summonerId).
How would I want to define a table/model in Django to store the list of fellowPlayers (of unknown length)?
If any more information is needed please comment.
If this can't be directly done, how would you suggest handling such a situation? My initial thought was to hardcore in a # of fields (fellow_player_1, fellow_player_2, etc) based on what I expect the maximum # of entries to be, but that approach seems like it could be improved on a lot, although 11 isn't too bad in terms of hardcoding.