skip to Main Content

Read value from DOM json – Magento

When i do Ctrl+U, there is below json in my page DOM <script type="text/x-magento-init"> { "#country": { "regionUpdater": { "optionalRegionAllowed": true, "regionListId": "#region_id", "regionInputId": "#region", "postcodeId": "#zip", "form": "#form-validate", "regionJson": { "config": { "show_all_regions": true, "regions_required": [ "AU", "BR", "CA",…

VIEW QUESTION

I want to extract the content of <span> tag from this received JSON Response. How to do that? – Woocommerce

This is the response i got. I want to extract the <span> tag from price_html "id": 2320, "name": "Lakme Sun Expert Sunscreen (spf-50) 50ml", "slug": "lakme-sun-expert-sunscreen-spf-50-50ml", "permalink": "https://www.utkalmerchandise.com/product/lakme-sun-expert-sunscreen-spf-50-50ml/", "date_created": "2020-08-01T05:49:57", "date_created_gmt": "2020-08-01T05:49:57", "date_modified": "2020-08-01T05:49:57", "date_modified_gmt": "2020-08-01T05:49:57", "type": "variable", "status": "publish",…

VIEW QUESTION

How to call this data piece in Ajax? – Jquery ajax

I would like to call the meters (732) piece of data from the following json API return: {"results":1,"data":[{"wind":{"degrees":200,"speed_kts":6,"speed_mph":7,"speed_mps":3,"speed_kph":11},"temperature":{"celsius":16,"fahrenheit":61},"dewpoint":{"celsius":14,"fahrenheit":57},"humidity":{"percent":88},"barometer":{"hg":30.06,"hpa":1018,"kpa":101.79,"mb":1017.92},"visibility":{"miles":"Greater than 6","miles_float":6.21,"meters":"10,000+","meters_float":10000},"ceiling":{"code":"BKN","text":"Broken","feet":2400,"meters":732,"base_feet_agl":2400,"base_meters_agl":732},"elevation":{"feet":256,"meters":78},"location":{"coordinates":[-2.27495,53.353699],"type":"Point"},"icao":"EGCC","station":{"name":"Manchester Airport"},"observed":"2020-07-18T00:50:00.000Z","raw_text":"EGCC 180050Z AUTO 20006KT 9999 BKN024 16/14 Q1018","flight_category":"MVFR","clouds":[{"code":"BKN","text":"Broken","feet":2400,"meters":732,"base_feet_agl":2400,"base_meters_agl":732}],"conditions":[]}]} This code doesn't seem to call it: jQuery.ajax({ type: 'GET', url: 'https://api.checkwx.com/metar/EGCC/decoded',…

VIEW QUESTION
Back To Top
Search