0

Can anyone explain how to import/extract a particular field from the following url into Google Sheets:

Wordnik URL

I'm guessing there is an IMPORTXML query that could do it, but it doesn't have the nodes that IMPORTXML usually uses to import that. Instead the code looks like this:

[{"mi":6.720745180909532,"gram1":"pretty","gram2":"much","wlmi":18.953166108085608},{"mi":6.650496643050408,"gram1":"pretty","gram2":"good","wlmi":18.469078820531266},{"mi":9.839004198061549,"gram1":"pretty","gram2":"darn","wlmi":17.298435816698845},{"mi":7.515791105774376,"gram1":"pretty","gram2":"cool","wlmi":15.515791105774376},{"mi":8.233704272151307,"gram1":"pretty","gram2":"impressive","wlmi":15.210984195651225}]

So if Cell A2 has the URL that produces this as the code, how do I get B2 to give me the text after "gram2" (in this case, "good", "darn", "cool" and "impressive").

Thanks

Tardy

tardy pigeon
  • 225
  • 6
  • 18

1 Answers1

0

I've come up with a workaround but it is kind of messy. I'd still like an answer to the question, but for reference and in case it's of use to anyone I'll post it here:

Using =IMPORTDATA(E10) (where E10 is the cell with the URL in) gave me an array (I guess based on .csv principles) that I could then manipulate using some other tools, like regexreplace, to get at the relevant bits of text.

tardy pigeon
  • 225
  • 6
  • 18