I'm sorry for the question it maybe easy but I tried many and many with no result, I can't understand the concept of using json with plugin selectize .. I'm trying to load json file contains countries, to display it in select field in my form. I found countries json file on github. this is my js code
$('select#country').selectize({
valueField: 'item',
labelField: 'item',
options: 'countries.json'
});
I read plugin usage documentation but i had confused. I need help example of using json or parsing json to object to use it with selectize plugin !
If you have
Then you can pass JSON values :