I’m using Google Docs and YQL to power a job postings board. I got one version up and running at
http://jsfiddle.net/N4Hb8/8/ .
Then I modified the YQL query to only get jobs listed as “open”, which returns this JSON object:
But the resulting table is full of “undefined”‘s.
What went wrong?
What appears to have gone wrong is that in your first example,
itemis an actual object, whereas in your second example,itemactually refers to the columns you want. If youconsole.log(item)you’ll see what I mean.More specifically, it appears that in your first example, it happens to return an array of results. In your second example, it returns a single result.
To fix your code, you’ll need to handle the special case that you’re returned only one item.