例如,我接到了一個URL以下JSONYahoo YQL API - 如何選擇名稱爲保留的YQL關鍵字的JSON字段?
{ "time": "2014-05-10 06:23:36 UTC",
"values": [
{
"time_timetable_utc": "2014-05-10T06:25:00Z",
"time_realtime_utc": null,
"flags": ""
},
{
"time_timetable_utc": "2014-05-10T06:45:00Z",
"time_realtime_utc": null,
"flags": ""
},
]
}
這將在YQL
工作select time from json where url="{url}"
它將返回我唯一的一次場
{"time": "2014-05-10 06:23:36 UTC"}
但是,如果我只是想獲取「值」數組字段,其中包含以下內容
select values from json where url="{url}"
我會收到此錯誤信息
Query syntax error(s) [line 1:7 expecting fields_or_star got 'values']
只想問的是,可以選擇一個JSON字段的名稱是保留雅虎YQL關鍵字?
我知道這將工作
select * from json where url="{url}" and itemPath="json.values"
但是,這是有可能做到這一點不使用 「itemPath」 條件?
如何在YQL select中使用保留字如「values」?
任何理由不想使用itemPath? –