I am a programing newbie and usually use Python but have found myself needing to use Javascript for this project (phonegap).
i retrieve the following query from a server
`[["CompanyName", "lat", "long", ID, "street", 6.8], ["CompanyName", "lat", "long", ID, "street", 23.7]]`
In Python i get would do the following to print CompanName for each entry.
for x in r.json():
print x[0]
How would i achieve the same thing in Javascript?
when i retrieve the query if i try to loop through it, it iterates every character of the query as a string. so i try the following:
var result = xmlhttp.responseText;
result = eval("("+ result +")");
i loop through it with:
for (var i in result)
{
display +="<br/>" + result[i];}
How would i specify just the CompanyName like in the Python example?
`