dic = {"foreignNames":[
{
"name":"Archange Avacyn",
"language":"French",
"multiverseid":411061
},
{
"name":"Erzengel Avacyn",
"language":"German",
"multiverseid":410731
},
{
"name":"Arcangelo Avacyn",
"language":"Italian",
"multiverseid":411391
},
{
"name":"大天使アヴァシン",
"language":"Japanese",
"multiverseid":411721
},
{
"name":"대천사 아바신",
"language":"Korean",
"multiverseid":412051
},
{
"name":"Arcanjo Avacyn",
"language":"Portuguese (Brazil)",
"multiverseid":412381
}
]}
def find_lang(lingua):
for i in dic['foreignNames']:
if(i['language'].lower().startswith(lingua.lower())):
return i
return None
lang = find_lang('portuguese')
print(lang)
ZGljID0geyJmb3JlaWduTmFtZXMiOlsgIAogICAgeyAgCiAgICAgICJuYW1lIjoiQXJjaGFuZ2UgQXZhY3luIiwKICAgICAgImxhbmd1YWdlIjoiRnJlbmNoIiwKICAgICAgIm11bHRpdmVyc2VpZCI6NDExMDYxCiAgICB9LAogICAgeyAgCiAgICAgICJuYW1lIjoiRXJ6ZW5nZWwgQXZhY3luIiwKICAgICAgImxhbmd1YWdlIjoiR2VybWFuIiwKICAgICAgIm11bHRpdmVyc2VpZCI6NDEwNzMxCiAgICB9LAogICAgeyAgCiAgICAgICJuYW1lIjoiQXJjYW5nZWxvIEF2YWN5biIsCiAgICAgICJsYW5ndWFnZSI6Ikl0YWxpYW4iLAogICAgICAibXVsdGl2ZXJzZWlkIjo0MTEzOTEKICAgIH0sCiAgICB7ICAKICAgICAgIm5hbWUiOiLlpKflpKnkvb/jgqLjg7TjgqHjgrfjg7MiLAogICAgICAibGFuZ3VhZ2UiOiJKYXBhbmVzZSIsCiAgICAgICJtdWx0aXZlcnNlaWQiOjQxMTcyMQogICAgfSwKICAgIHsgIAogICAgICAibmFtZSI6IuuMgOyynOyCrCDslYTrsJTsi6AiLAogICAgICAibGFuZ3VhZ2UiOiJLb3JlYW4iLAogICAgICAibXVsdGl2ZXJzZWlkIjo0MTIwNTEKICAgIH0sCiAgICB7ICAKICAgICAgIm5hb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