Q:

Creating a for loop inside javascript

I am trying to implement a chart into my website (FusionCharts), i don't want to manually define each bar. Is there any way to implement a for loop here? ( for(i =1; i<=11; i++) My issue is the '{' & '},'  
The FusionCharts example is as follows 
    "data": [{
        "label": "Jan",
        "value": "420000"
    }, {
        "label": "Feb",
        "value": "810000"
    }, {
        "label": "Mar",
        "value": "720000"
    }, {
        "label": "Apr",
        "value": "550000"
    }, {
        "label": "May",
        "value": "910000"
    }, {
        "label": "Jun",
        "value": "510000"
    }, {
        "label": "Jul",
        "value": "680000"
    }]
}
}
);

My only solution was to have the below in the for loop, but it ofcourse wont work with the brackets.
     {
        "label": "xxxx",
        "value": "xxxxx"
    },

...
    for (i=1; i<=11; i==) 
     {

        {
        "label": "xxxx",
        "value": "xxxxx"
    },

     }

I realise im probably being stupid in this situation so thanks for any advice

A:

In your loop you can write
data.push({
    "label": "xxxx",
    "value": "xxxxx"
});

