Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (targeting)
Viewing all articles
Browse latest Browse all 2

JSON Elements

$
0
0

Hi,

I'm trying to parse some JSON generated from an API. Here is the JSON:

{
  "response_type": "ok",
  "total_results": 12,
  "page": 1,
  "total_pages": 18,
  "sets": [
    {
      "id": 12433,
      "title": "Title of Content",
      "creator": "jdoe",
      "created": 1144296408,
      "last_modified": 1268854818
    },
 
    ...more results...
  ]
}
I use an xhr onload function and parse the JSON to the variable s.

I know how to target one of the main results like total_pages by doing s.total_pages. However, how would I get a result for title or id or anything in the set?

Thanks


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images