Extracting data out of application/ld+json

Hi everyone,

I've been having problems extracting data out of a , for instance if I want to extract the sku of a product page.

For instance:

<script type="application/ld+json"
{"@context":"https:\/\/schema.org\/","@type":"Product","@id":"https:\/\/mitsuwa.com.pe\/producto\/martillo-para-lanzamiento-mitsuwa\/#product","name":"Martillo para Lanzamiento Mitsuwa","url":"https:\/\/mitsuwa.com.pe\/producto\/martillo-para-lanzamiento-mitsuwa\/","image":"https:\/\/mitsuwa.com.pe\/wp-content\/uploads\/2019\/03\/29-3-1.jpg","description":"","sku":11977"

What would be the procedure to get the last part.

Thanks in advance, this is the URL btw: https://mitsuwa.com.pe/producto/martillo-para-lanzamiento-mitsuwa/

RegexpFindOnUrl works for me:
=RegexpFindOnUrl(A1;",""sku"":(\d+),";1)

image

2 Likes

Thanks a lot, I didn't know of that Regex option, it worked great.

I also found sku that started with "", so I added this formula and it worked great as well.

=RegexpFindOnUrl(A1,",""sku"":""(\d+)"",",1)

1 Like