cannot load json from url response
hi, I am trying to load json from a url like:
url: 'http://localhost/webiste/public/admin/restaurant/getpaymentoptions'
and it is not working even though the URL return the result:
[{"text":"Cash","value":"Cash"},{"text":"Mastercard","value":"Mastercard"},{"text":"Visa","value":"Visa"}, .....}]
is file.json the only format this plugin recognize? what should I do to make it get the json from the URL response?
Any error in the browser console?
Is your server returning the json object as a json response or as a html/text response? You have to return it as json response to make it work. Good luck.
I am having the same issue. I am using a Coldfusion CFC to return the results in a json format and the data IS returning in the developer tools / network view and I can search and get just those results but they do not populate the input at all. I get the error: "Cannot use 'in' operator to search for 'length' in [{"text":"Account Manager (MM)","value":"Account Manager (MM)"}," (etc.... didn't copy all results here)
Does this plugin only recognize a .json file?