I recently migrated to the YII 2 framework. And I have one small question: I have a json that I need to pop a DropDownList. The Json file:
[
{"codigo": "05", "descricao" : "Administrador"},
{"codigo": "10", "descricao" : "Diretor"},
{"codigo": "16", "descricao" : "Presidente"},
{"codigo": "22", "descricao" : "Sócio"},
{"codigo": "29", "descricao" : "Sócio ou Acionista Incapaz ou Relativamente Incapaz (exceto menor)"},
{"codigo": "30", "descricao" : "Sócio ou Acionista Menor (assistido/representado)"},
{"codigo": "37", "descricao" : "Sócio Pessoa Jurídica Domiciliado no Exterior"},
{"codigo": "38", "descricao" : "Sócio Pessoa Física Residente ou Domiciliado no Exterior"}
]
As you can see, I have a 'code' and a 'description'. I need to load this dropDownlist with this json , where it is located in a directory of my application ('web / js / json / example.json').