I'm trying to work with autocomplete from Materialize.
The API Request provides following data:
[
    {
       "id": 4007,
       "name": "Curitiba, Paraná, BR"
    },
    {
       "id": 4391,
       "name": "Curitibanos, Santa Catarina, BR"
    }
]
But I need format this data using JavaScript in something that looks like:
{ 
  "Curitiba, Paraná, BR": null,
  "Curitibanos, Santa Catarina, BR" , null
}
Thank you in advance for any help! :)
 
     
    