Sign up ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

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

1 Answer 1

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 at 18:24

You must log in to answer this question.

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