jQuery getJSON Adobe air

I’m trying to make an app in adobe air but the following code doesn’t work in it


$.getJSON( url, function( data ){
	$.each(data, function(i, data){
		$('#sidebar').append(
			'<li>"' + data.text + '"</li>'
		);
	});
});

It works perfectly in the browser but not at all in the app

I’ve tried $.ajax but the same story and i tried $(“#sidebar”).load() but i don’t really know how to use this and it just returns a string of what was in the file but u want it in an array like the first one ($.getJSON)

Any help would be greatly appreciated