Given this dictionary:
{
"movies": {
"action": [
{
"title": "Movie A",
"score": 9.7
},
{
"title": "Movie B",
"score": 7.0
}
]
}
}
How would you extract score and put it in a new dictionary keyed off title like below?
{
"Movie A": 9.7,
"Movie B": 7.0
}
I'm able to do it using traditional loops, but I'm hoping there is a more efficient way in Python.