【问题标题】:Importjson exclude parameters spreadsheetImportjson 排除参数电子表格
【发布时间】:2018-02-06 15:02:43
【问题描述】:
如何使用 importjson 只显示结果参数?
例子:
=IMPORTJSON("https://api.coinmarketcap.com/v1/ticker/bitcoin", "/name")
"Name"
"Bitcoin"
我只需要显示这个:
"Bitcoin"
我的想法是用我的博客来展示最新的报价https://1bitcoinhoje.com
【问题讨论】:
标签:
json
google-apps-script
google-sheets
custom-function
【解决方案1】:
只需解析您的rawHeaders:
=ImportJSON("https://api.coinmarketcap.com/v1/ticker/bitcoin","/name","noHeaders")
ImportJSON 具有rawHeaders 的解析选项:
-
noHeaders:不包含标题,只包含数据
-
debugLocation :在每个值前面加上它所属的行和列。
-
noInherit : 不要从父元素继承值
-
noTruncate: 不要截断值
-
rawHeaders: 不要美化标题