hi,

i do not understand so well how the function getJSON works. i've read the
documentation but i think i miss the point.
i would like to pass some argument/parameter to a php file which in return
gives me som JSON answer.

therefore i wrote the following code:
$.getJSON("lg.php",
{ start: 0, offset : 5 },
function(data)
{
 $.each(data, function(i,item)
 {
  alert(item[0].id + "\ni : "+i);
 });
});

1.how can i get each item without using a hardcoding 0 or 1 as index ?
i did not find anything into documentation :-(

thanks a lot for feedback


-- 
Alain
-----------------------------------------------------------
Windows XP x64 SP2 / Fedora 10 KDE 4.2
PostgreSQL 8.3.5 / MS SQL server 2005
Apache 2.2.10
PHP 5.2.6
C# 2005-2008

Reply via email to