I can not call my key name value. I get error: string indices must be integers, not str
. I need if or if I use the for but I do not understand why I get that error
diccionario = {
"inventorysources":(
{
'name': 'DK $ 2 |',
'device': 'desktop',
'cost':2,
'floor':2.5,
'publisher':"5a01e576becbf9000255f29c"
}
)
}
for inv in diccionario["inventorysources"]:
name = inv['name']
print name