【发布时间】:2021-04-01 12:28:02
【问题描述】:
我使用一种称为 AL 的语言工作,但我们有 JSON 对象、数组等。
我正在查询这个 api:http://citibikenyc.com/stations/json,我将结果存储在一个文本变量中。
我的目标是将 ID 和站名存储在单独的表中。我不知道应该如何遍历 ID 和 stationName 的所有元素。
我知道路径将是 stationBeanList[0].id 并且每次我不知道如何编写它时递增 0。
if Client.Get(url, Response) then begin
if Response.IsSuccessStatusCode then begin
Response.Content.ReadAs(Json);
J.ReadFrom(Json);
JsonBuffer.ReadFromText(Json);
JsonObj.ReadFrom(Json);
// How to iterate though all of the Elements
end;
end;
感谢任何帮助或建议。
【问题讨论】:
标签: json dynamics-al