我有一个包含以下内容的专栏:
7. {"resource":"abc"}
8. [{"resource":"def"},{"resource":"ghi"}]
我尝试获取“资源”的内容:
value.parseJson().resource
作品。如果我尝试获取多值单元格的内容,我无法让它工作。我根据https://github.com/OpenRefine/OpenRefine/wiki/GREL-Other-Functions尝试过:
forEach(value.parseJson().resource,v,v.resource)
我收到很多错误,例如:
7. {"resource":"abc"} Error: First argument to forEach is not an array
8. [{"resource":"def"},{"resource":"ghi"}] Error: Object does not have any field, including resource
而且我只能得到多值单元格,而不是带有这个的单值单元格:
forEach(value.parseJson(),v,v.resource)