You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何修复Google Sheets中IMPORTJSON的XPath路径以获取algo列表?

Fixing "Node not available" with IMPORTJSON in Google Sheets

Let's break down why you're seeing that error and how to resolve it:

Why your original formula fails

The Mining Pool Hub API returns a JSON structure where the return key contains an array of objects, not a direct object with an algo property. Your original path "return/algo" tries to access an algo field directly under return, but that node doesn't exist—each element inside the return array has the algo field instead.

The corrected formula

You need to use a wildcard * to iterate through every item in the return array, then pull the algo field from each entry. Here's the fixed formula:

=IMPORTJSON("http://miningpoolhub.com/index.php?page=api&action=getminingandprofitsstatistics", "return/*/algo")

Optional tweak for cleaner output

If you want to skip the auto-generated header row, add the third parameter "noHeaders" to suppress it:

=IMPORTJSON("http://miningpoolhub.com/index.php?page=api&action=getminingandprofitsstatistics", "return/*/algo", "noHeaders")

Quick sanity check

To confirm the JSON structure, just paste the API URL into your browser—you'll see that return is an array, and each entry in that array includes the algo property. This confirms the wildcard path is the correct approach.

内容的提问来源于stack exchange,提问作者Deividas

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 07:18:49