var retdata new Object function getData backend function dataReturn da

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
var retdata = new Object();
function getData(backend)
{
function dataReturn(data)
{
data.each(function(i)
{
retdata[i].text = $(this).text;
retdata[i].author = $(this).author;
retdata[i].date = $(this).date;
});
return retdata;
}
$.getJSON("test.php", dataReturn(data));
}