I have some pages on the web which echo results like:
[{"id":"1","company":"Gaurishankar","bus_no":"JHA 12 KH 1230"},
{"id":"2","company":"Gaurishankar","bus_no":"BA 2 KH 2270"}]
I want to use this json_encode data to be used in Javascript array like:
var data = http://api.mywebsite.com/get_data.php;
for (i = 0; i<data.length; i++){
//Do something here
}
How is this possible. I know its easy but I cant make this. I am a new learner. Plz help