Json to Array

Jan 14, 2015 at 12:34 AM
I receive from my webserver Json Data, similar to this

[{"agenda_server_id":"1","data":"2014-09-11","hora_inicio":"09:00","hora_fim":"10:00","aluno_id":"3","classe_id":"6","instrutor_id":"1","viatura_id":"1","status_aula_id":"1","km_aula":"0","recolha":"","obs":"","sincroniza":"0","tablet_id_sincroniza":"","alvara":"3274"},{"agenda_server_id":"2","data":"2014-09-11","hora_inicio":"12:00","hora_fim":"13:00","aluno_id":"3","classe_id":"6","instrutor_id":"1","viatura_id":"1","status_aula_id":"1","km_aula":"0","recolha":"","obs":"","sincroniza":"0","tablet_id_sincroniza":"","alvara":"3274"},{"agenda_server_id":"3","data":"2014-09-11","hora_inicio":"16:00","hora_fim":"17:00","aluno_id":"2","classe_id":"2","instrutor_id":"1","viatura_id":"2","status_aula_id":"1","km_aula":"0","recolha":"","obs":"","sincroniza":"0","tablet_id_sincroniza":"","alvara":"3274"},{"agenda_server_id":"4","data":"2014-09-11","hora_inicio":"17:00","hora_fim":"18:00","aluno_id":"2","classe_id":"2","instrutor_id":"1","viatura_id":"2","status_aula_id":"1","km_aula":"0","recolha":"","obs":"","sincroniza":"0","tablet_id_sincroniza":"","alvara":"3274"},{"agenda_server_id":"5","data":"2014-12-02","hora_inicio":"08:00","hora_fim":"09:00","aluno_id":"3","classe_id":"6","instrutor_id":"1","viatura_id":"1","status_aula_id":"1","km_aula":"0","recolha":"","obs":"","sincroniza":"0","tablet_id_sincroniza":"","alvara":"3274"},{"agenda_server_id":"6","data":"2014-12-23","hora_inicio":"11:00","hora_fim":"12:00","aluno_id":"2","classe_id":"2","instrutor_id":"1","viatura_id":"2","status_aula_id":"1","km_aula":"0","recolha":"","obs":"","sincroniza":"0","tablet_id_sincroniza":"","alvara":"3274"}]

I need to iteract trough this data in a kind of FOR..NEXT loop to display or store, but so far I havent understood how to do it.

Can some one help me ?

Many Thanks.
Aug 21, 2015 at 6:13 PM
SET PROCEDURE TO qdfoxJSON
JSONStart()
JSON.stringDelimitator = ["]

odata = JSON.parse(myjsonstring)

FOR x = 1 TO odata.count
strline = odata.Item(x)
nID = strLine.agenda_server_id
(same for all fields strline. + field name
ENDFOR
Marked as answer by JMTM on 9/19/2015 at 3:59 PM
Sep 19, 2015 at 11:59 PM
Many thanks IQZero, works like a charm.