HOW TO GET DATA FROM THE CACHE IN JS

  html, javascript
// немного позже

// Check browser support
if (typeof(Storage) !== "undefined") {
  // Store

  // Retrieve

  document.getElementById("result").innerHTML = sessionStorage.getItem("shoppingCart");

} else {
  document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Storage...";
}
        <h1 class="logo">MCHJ TIYANFARM MDS</h1>
    <div>XOZIRGI SOVDO NARXI: <span class="total-cart"></span></div>
        <div class="address">Кадан мфй,Узбекистон кучаси,72А</div>

        <div class="transactionDetails">
            <div class="detail">CHEK TURI:</div>
            <div class="detail">TRN#1313</div>
            <div class="detail">SMENA</div>
      <p class="surveyID">001</p>
        </div>

        <div class="transactionDetails">SOTUVCHI:   <? $x = $_COOKIE['email']; echo $x;?>   </div>
        <div class="transactionDetails">
            <div class="detail">1</div>
            <div class="detail">

      <div id="result"></div>

      </div>
            <div class="detail">3.99</div>
        </div>

        <div class="survey bold">
        <p>САВДО ID #</p>
    
        </div>
        <div class="returnPolicy">
            <div class="detail"><div id="current_date_time_block" class=""></div></div>

        </div>
    <div id="result"></div>
    <div class="transactionDetails">DIREKTOR:   <? $x = $_SESSION['row']; echo $x;?>    </div>

my site looks like this NOW
enter image description here

enter image description here

enter image description here

I WANT TO GET INFO FROM THE SESSION STORAGE PRODUCT NAME AND PRICES
OR HOW GETS NORMAL TEXT FROM THIS [{"NAME":"АЗИ","PRICE":7900,"COUNT":1}]

Source: Ask Javascript Questions

LEAVE A COMMENT