-
Hi there, just a quick question. Is there a way to only display some of this information? / Other methods to gather information from the API. Currently race.results[0] displays all the information for the driver who won the race, I would like to tidy up this data or make is more specific. This is my code: This is the current output, but I'd like to narrow it down to just the driver name and some other details like nationality etc. Any help would be hugely appreciated, thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Each item in |
Beta Was this translation helpful? Give feedback.
Each item in
Session.results
is a dictionary. Therefore, you can just use the usual way of getting values from a dictionary.For example, to get the driver code:
race.results[0]['Driver']['code']