I'm using the framework Materializecss - autocomplete , and would like to feed an autocomplete field with data coming from my database. Autocomplete works with data in the following object structure:
{
"Apple": null,
"Microsoft": null,
"Google": 'https://placehold.it/250x250'
}
And my data is exported in the valid JSON structure below (the data is dynamic):
[{
"Apple": null
},
{
"Microsoft": null
},
{
"Google": 'https://placehold.it/250x250'
}]
So, how do I convert this my valid JSON structure into the structure used by autocomplete?
But if someone knows how to make autocomplete work with this valid JSON, better yet.
I'm using php, jquery and mysql
I thank you for your cooperation.