Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the Stack Apps API. Retrieving questions by tags works well, and the JSON is returned. Now I need to parse the JSON and there is something wrong with my code:

    url: ''+_tags+'&site=stackoverflow',
    success: function(data){

      for(var I = 0 ; I < data.length; I ++){

the JSON is not alerted, nothing is alerted.

the JSON I retrieve is like this:

            "title":"How to avoid concurrent exception in ArrayList in android?",
            "tags":[ "java", "android"],

What am I doing wrong?

share|improve this question
up vote 2 down vote accepted

Thanks to Dave for this ;) Your for loop should be:

var i, l;
for (i = 0, l = data.items.length; i < l; i++) {
    // Get your data here
share|improve this answer
hey hey you're stoling :D – Badaboooooom Dec 6 '12 at 20:33
Why 'stolling'? I don't get it, sorry ... – Pierre.Vriens Apr 12 '15 at 18:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .