Typeahead and Bloodhound - how to get JSON result

前端 未结 2 478
天命终不由人
天命终不由人 2020-12-29 07:29

I have the json list of Countries: http://vocab.nic.in/rest.php/country/json

And I\'m trying to get country_id and country name with Bloodhound suggestion engine. O

2条回答
  •  抹茶落季
    2020-12-29 08:11

    NOTE: if you do all this and it still is not working examine your data.json file (whatever you have named it)

    example of good format: https://github.com/twitter/typeahead.js/blob/gh-pages/data/countries.json

    ['data1','data2',.....]

    I was tripped up on out of place quote.

提交回复
热议问题