openrefine - Trying to parse a Json with Open Refine GREL -
i'm trying parse json can't find way extract data want.
{ "results" : [ { "address_components" : [ { "long_name" : "44", "short_name" : "44", "types" : [ "street_number" ] }, { "long_name" : "rue montaigne", "short_name" : "rue montaigne", "types" : [ "route" ] }, { "long_name" : "agen", "short_name" : "agen", "types" : [ "locality", "political" ] }, { "long_name" : "lot-et-garonne", "short_name" : "lot-et-garonne", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "aquitaine", "short_name" : "aquitaine", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "france", "short_name" : "fr", "types" : [ "country", "political" ] }, { "long_name" : "47000", "short_name" : "47000", "types" : [ "postal_code" ] } ], "formatted_address" : "44 rue montaigne, 47000 agen, france", "geometry" : { "bounds" : { "northeast" : { "lat" : 44.1994907, "lng" : 0.6172573 }, "southwest" : { "lat" : 44.19949039999999, "lng" : 0.6172388999999999 } }, "location" : { "lat" : 44.19949039999999, "lng" : 0.6172573 }, "location_type" : "range_interpolated", "viewport" : { "northeast" : { "lat" : 44.20083953029149, "lng" : 0.618597080291502 }, "southwest" : { "lat" : 44.1981415697085, "lng" : 0.6158991197084979 } } }, "partial_match" : true, "types" : [ "street_address" ] } ], "status" : "ok" }
i'm trying isolate lat , lng point geolocalized google refine grel ("location" : { "lat" : 44.19949039999999, "lng" : 0.6172573 }
).
can give me hint of should succeed?
try this:
with(value.parsejson().results[0].geometry.location, pair, pair.lat +", " + pair.lng)
Comments
Post a Comment