我在 bigquery 中有一个名为 test 的表。它有一个名为 的列attributes。该值采用 JSON 格式,其中“# of items”为键,例如:{"# of items": "100"}
当我执行下面的查询时
SELECT JSON_EXTRACT(attributes, "$['# of items']") AS num_items
FROM test
我遇到了以下错误:
Error: JSONPath parse error at: ['# of items']
获取其价值的最简单方法是什么?