I have this Json inside mongodb
{
"_id" : ObjectId("5aba203f00435837802f9c49"),
"AED" : 4.572098,
"AFN" : 86.093419,
"ALL" : 130.478529,
"AMD" : 597.524404,
"ANG" : 2.216574,
"AOA" : 264.413246,
}
And this in Python
import pymongo
uri = "mongodb://127.0.0.1:27017"
client= pymongo.MongoClient(uri)
database = client['countries_db']
collection = database['currency']
currency =[AED['AED'] for AED in collection.find({})]
res=currency*2
print(res)
Output: [4.572098, 4.572098]
And when I print this, It comes as a string value, It repeats AED two times. Is there any way to call the value as float and calculate it? Thanks.