Skip to content
Advertisement

Get data from RichSnippet JSON and set the same string into other variable

I have this JSON generated from external (Reviews-io) script: https://widget.reviews.co.uk/rich-snippet/dist.js

JavaScript

I need to get all the string of numbers in “sku”, and then put them in another variable as same format (6647; 6647_1; 6647_2)

I try to get the numbers using this JS but doesn’t works

JavaScript

Can you help me check what I am doing wrong, to get this sku’s value string, please?

Advertisement

Answer

JSON.parse is not too much? ,handle it as it is internally (a JSON indeed)

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement