次の内容の列があります。
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)