0

Weather webservice is returning .js file. How to get this to java object so I could get something like this going:

var data1 = new Array();
for(var i = 0; i < jsObject.series[0].data.length;i++){
data1.push(jsObject.series[0].data[i].y);

Currently Im just getting my .js file to string :/. Just a tutorial or something will help.

This is the websites response:

new Highcharts.Chart({
chart: { renderTo: 'tlak' },
plotOptions: { line: { dataLabels: { formatter: function() { if(this.x != ' ') return this.y; } } } },
series: [{ data: [1016,1015,1016,1016,1015,1013,1011,1012,1012,1010,1010,1009,1008,1006,1005,1005,1004,1003,1004,1004,1004,1004,1003,1004,1005] }]
});

$(document).ready(
function($){

    $('#sedmodnevna > li').live(
        'click hover',
        function(){
            $('#sedmodnevna > li').removeClass('selected');
            $(this).addClass('selected');
            $('.dan').hide();
            $('#odabrani-dan > div:nth-child(' + ($(this).index() + 1) + ')').show();
        }
    );

    $('#izabrani-grad a').click(
        function(){
            igrad = $(this).attr('rel');
            $('#izabrani-grad').load('/ajax/izaberi-grad.php', {ig:     igrad});
            return false;
        }
    );
}
);

0 Answers0