Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with remote url datasets #72

Closed
cheluis opened this issue Mar 1, 2013 · 4 comments
Closed

Problem with remote url datasets #72

cheluis opened this issue Mar 1, 2013 · 4 comments

Comments

@cheluis
Copy link

cheluis commented Mar 1, 2013

Hi guys, I started to try the library today, and testing with a simple remote dataset, I came with this jquery error:

TypeError: invalid 'in' operand e

After a quick check, I realized that the error is triggering on the onSuccess callback of the ajax call of the get method, this line:

cb && cb(resp);

I'm missing something? Working with jquery 1.9.1 and typeahead.js,

@jharding
Copy link
Contributor

jharding commented Mar 1, 2013

Can you post the entire stack trace? Also, you're sure JSON is being returned from the remote call?

@cheluis
Copy link
Author

cheluis commented Mar 1, 2013

Nevermind, outputting mistakes, sorry. But I have a question. Which is the format that the json from the remote url? Sorry for the inconvenience.

@jharding
Copy link
Contributor

jharding commented Mar 1, 2013

The JSON returned from the remote call should just be an array of datums. In v0.9, you'll be able to return whatever format you want and provide a filter function that picks out or generates the array of datums. Does that answer your question?

@cheluis
Copy link
Author

cheluis commented Mar 1, 2013

Yes it does. Thank you!

@jharding jharding closed this as completed Mar 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants