我有一个非常愚蠢的问题,但我似乎找不到任何答案。我有来自在线天气 API 的 JSON,JSON 如下所示:
{"coord":{"lon":4.4,"lat":51.22},"sys":{"type":1,"id":4839,"message":0.1065,"country":"Belgium","sunrise":1414218231,"sunset":1414254541},"weather":[{"id":701,"main":"Mist","description":"mist","icon":"50d"},{"id":310,"main":"Drizzle","description":"light intensity drizzle rain","icon":"09d"}],"base":"cmc stations","main":{"temp":286.3,"pressure":1019,"humidity":87,"temp_min":285.15,"temp_max":287.15},"wind":{"speed":3.1,"deg":210},"clouds":{"all":75},"dt":1414232888,"id":2803138,"name":"Antwerp","cod":200}
我想在数据仓库工具 Pentaho 中使用这个 JSON 数据。我被困在如何获得正确的价值观上。
例如,假设我想检索位于“sys”内的“country”。我将如何使用美元符号表示法检索它?我试过 $.sys.country 但没有用。我不确定如何将此 JSON 结构转换为美元符号表示法。
真的希望有人可以帮助,提前谢谢!