how to display partial data from linked source

Newbie question:
I’m pulling in crypto current prices from CoinGecko into cells, eg
=WEBSERVICE(“https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=gbp”)&T(TODAY())
=WEBSERVICE(“https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=gbp”)&T(TODAY())

These return results such as
{“bitcoin”:{“gbp”:41900}}
I want to display only 41900.
How please? I tried this “REFIND” solution
but not luck. thanks.

1 Like

My workaround was the following. In an adjacent cell I put in:

=REGEX((O5),"-?\d+(.\d{1,5})?")

Where O5 is the cell importing the API.

For some reason this REGEX… was not recognized as a digit, so in a THIRD adjacent cell:

=VALUE(P5)

Where P5 is the REGEX… cell. This now accepts number-formats (currency, etc.)

Inelegant I’m sure, but it works!

1 Like

You can involve the REGEX with VALUE, =VALUE(REGEX((O5),"-?\d+(.\d{1,5})?")) to avoid another cell.

1 Like