【问题标题】:Retrieve a subset of data using ImportJSON custom function使用 ImportJSON 自定义函数检索数据子集
【发布时间】:2016-04-15 22:26:16
【问题描述】:

我正在使用 Trevor Lohrbeer 的 importjson() custom function 将一些数据从 this JSON source 导入到 Google 表格中。

我不希望提供所有信息;我只想要列 E、V、W、X、AA、AB、AC、AD。

我尝试了一些事情,然后才意识到我不知道我在用这个参数做什么:

=importjson("http://www.pgatour.com/data/r/stats/current/102.json","This","AndThis")

如何修改此函数以仅检索上述项目?

【问题讨论】:

  • importjson 是 Trevor Lohrbeer 和 documented here 编写的自定义函数。

标签: json google-apps-script google-sheets custom-function


【解决方案1】:

您可以使用QUERY function 轻松完成此操作,对importjson() 调用的结果进行后过滤。:

=QUERY(importjson("http://www.pgatour.com/data/r/stats/current/102.json"),"select Col5, Col22, Col23, Col24, Col27, Col28, Col29, Col30")

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-13
    • 2022-01-09
    • 2022-07-11
    • 2017-03-02
    • 2023-04-11
    相关资源
    最近更新 更多