Scrape data from javascript code on web site?

Can anyone tell me how I can scrape the following data from the following code on a web site? I want to extract the available inventory quantity for each product size listed below. (XS, S, M, L, XL)

What type of a selector should I use?

  // <![CDATA[
    $(function() {
      $product = $('.product-' + 3692688638027);
      new Shopify.OptionSelectors("product-select-3692688638027", { product: {"id":3692688638027,"title":"Nadia Chenille Short Sleeve Mini Dress - Grey","handle":"nadia-chenille-short-sleeve-mini-dress-grey","description":"\u003cmeta charset=\"utf-8\"\u003e\n\u003cdiv\u003e\n\u003cmeta charset=\"utf-8\"\u003e\n\u003cmeta charset=\"utf-8\"\u003e\n\u003cp\u003eKeep it simple but chic with our CHENILLE  Short Sleeve Mini  Dress.  Featuring super soft fabric, with a crew neckline and short cap sleeves  detail, your body will be thanking you later for your snatched waist in this gorgeous dress. We love this teamed with our LEXI heels and a mini bag for the perfect  attire we're all crushing on.\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003eRaven  is  168cm  and wears an S\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e100% polyester\u003c\/li\u003e\n\u003cli\u003eSlip-On\u003c\/li\u003e\n\u003cli\u003eWash with similar colours\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cul\u003e\u003c\/ul\u003e\n\u003c\/div\u003e","published_at":"2020-04-14T11:23:02+10:00","created_at":"2019-06-05T12:37:59+10:00","vendor":"SOP","type":"Dresses","tags":["Above Knee","BDC DRESS","Casual Dresses","chenilel","chenniel","chennille","Collection: Airport Looks","Colour:Grey","Day Dresses","EXTRA15DRESSES","Knits","KNT DRESS","lexi-perspex-buckle-strap-heel-clear-nude","LOUNGE WEAR","MESHKI CORE 2019","MN DRESS","New Arrivals","PARTYBOGOF","short sleeve dress","short sleeve dresses","Type:Basic Dresses","Type:Bodycon Dress","Type:Bodycon Dresses","Type:Bodyon Dresses","Type:Dress","Type:Dresses","Type:Mini","Type:Mini Dress","Type:Mini Dresses","Weekend Looks","WFH","Winter Styles"],"price":6500,"price_min":6500,"price_max":6500,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":28741469700171,"title":"XS","option1":"XS","option2":null,"option3":null,"sku":"DR00512K-GRY-XS","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Nadia Chenille Short Sleeve Mini Dress - Grey - XS","public_title":"XS","options":["XS"],"price":6500,"weight":300,"compare_at_price":null,"inventory_quantity":6,"inventory_management":"shopify","inventory_policy":"deny","barcode":"9350536095065"},{"id":28741469732939,"title":"S","option1":"S","option2":null,"option3":null,"sku":"DR00512K-GRY-S","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Nadia Chenille Short Sleeve Mini Dress - Grey - S","public_title":"S","options":["S"],"price":6500,"weight":300,"compare_at_price":null,"inventory_quantity":19,"inventory_management":"shopify","inventory_policy":"deny","barcode":"9350536095072"},{"id":28741469765707,"title":"M","option1":"M","option2":null,"option3":null,"sku":"DR00512K-GRY-M","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Nadia Chenille Short Sleeve Mini Dress - Grey - M","public_title":"M","options":["M"],"price":6500,"weight":300,"compare_at_price":null,"inventory_quantity":12,"inventory_management":"shopify","inventory_policy":"deny","barcode":"9350536095089"},{"id":28741469798475,"title":"L","option1":"L","option2":null,"option3":null,"sku":"DR00512K-GRY-L","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Nadia Chenille Short Sleeve Mini Dress - Grey - L","public_title":"L","options":["L"],"price":6500,"weight":300,"compare_at_price":null,"inventory_quantity":3,"inventory_management":"shopify","inventory_policy":"deny","barcode":"9350536095096"},{"id":28741469831243,"title":"XL","option1":"XL","option2":null,"option3":null,"sku":"DR00512K-GRY-XL","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Nadia Chenille Short Sleeve Mini Dress - Grey - XL","public_title":"XL","options":["XL"],"price":6500,"weight":300,"compare_at_price":null,"inventory_quantity":1,"inventory_management":"shopify","inventory_policy":"deny","barcode":"9350536095102"}],"images":["\/\/cdn.shopify.com\/s\/files\/1\/0339\/6517\/products\/Meshki__36924.jpg?v=1566595200","\/\/cdn.shopify.com\/s\/files\/1\/0339\/6517\/products\/Meshki__36967.jpg?v=1566595083","\/\/cdn.shopify.com\/s\/files\/1\/0339\/6517\/products\/Meshki__36929.jpg?v=1566595199"],"featured_image":"\/\/cdn.shopify.com\/s\/files\/1\/0339\/6517\/products\/Meshki__36924.jpg?v=1566595200","options":["Size"],"media":[{"alt":"Nadia Chenille Short Sleeve Mini Dress - Grey - MESHKI","id":1287881490507,"position":1,"preview_image":{"aspect_ratio":0.667,"height":2700,"width":1800,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0339\/6517\/products\/Meshki__36924.jpg?v=1569173358"},"aspect_ratio":0.667,"height":2700,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0339\/6517\/products\/Meshki__36924.jpg?v=1569173358","width":1800},{"alt":"Nadia Chenille Short Sleeve Mini Dress - Grey - MESHKI","id":1287881818187,"position":2,"preview_image":{"aspect_ratio":0.667,"height":2700,"width":1800,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0339\/6517\/products\/Meshki__36967.jpg?v=1569173358"},"aspect_ratio":0.667,"height":2700,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0339\/6517\/products\/Meshki__36967.jpg?v=1569173358","width":1800},{"alt":"Nadia Chenille Short Sleeve Mini Dress - Grey - MESHKI","id":1287881752651,"position":3,"preview_image":{"aspect_ratio":0.667,"height":2700,"width":1800,"src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0339\/6517\/products\/Meshki__36929.jpg?v=1569173358"},"aspect_ratio":0.667,"height":2700,"media_type":"image","src":"https:\/\/cdn.shopify.com\/s\/files\/1\/0339\/6517\/products\/Meshki__36929.jpg?v=1569173358","width":1800}],"content":"\u003cmeta charset=\"utf-8\"\u003e\n\u003cdiv\u003e\n\u003cmeta charset=\"utf-8\"\u003e\n\u003cmeta charset=\"utf-8\"\u003e\n\u003cp\u003eKeep it simple but chic with our CHENILLE  Short Sleeve Mini  Dress.  Featuring super soft fabric, with a crew neckline and short cap sleeves  detail, your body will be thanking you later for your snatched waist in this gorgeous dress. We love this teamed with our LEXI heels and a mini bag for the perfect  attire we're all crushing on.\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003eRaven  is  168cm  and wears an S\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e100% polyester\u003c\/li\u003e\n\u003cli\u003eSlip-On\u003c\/li\u003e\n\u003cli\u003eWash with similar colours\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cul\u003e\u003c\/ul\u003e\n\u003c\/div\u003e"}, onVariantSelected: selectCallback, enableHistoryState: true });
    });
  // ]]>

URL of the site: https://www.meshki.com.au/collections/dresses/products/nadia-chenille-short-sleeve-mini-dress-grey?variant=28741469700171

Thank you.

Try a Text selector with script:contains('new Shopify.OptionSelectors') as the selector.
This will give you the entire javascript content.
You'll need to extract the individual quantities after the scrape.

Thank you for your reply but I'm looking for a way to extract just the inventory quantity and pricing using Webscraper either as an element or from the HTML source code.