I'm trying to extract a value with a specified key. below are the data example; example = [{'a':0,'b':2,'c':4}]
"results I want : 2"
I'm trying to extract a value with a specified key. below are the data example; example = [{'a':0,'b':2,'c':4}]
"results I want : 2"
To get the value of b
, you would need to use example[0]['b']
. You need the [0]
since you also have an array enclosing the object.