title: Append in JQuery from JSON Response
body: <p>I am trying to add data from a response inside a HTML block</p>
  <p>What I have done</p>
  <pre><code>...
      success: function () {
                    console.log($(&quot;#re-side-cart-items&quot;))
                    $.getJSON('/cart.js', function (cart) {
                      $.each(cart.items, function (index, element) {
                          if(element.id == rewards_variant_id){
                            console.log($(&quot;#re-sidecart-item-template&quot;).html());
                            $(&quot;#re-side-cart-items&quot;).append($(&quot;#re-sidecart-item-template&quot;).html())
                          }
                      })
                    });
                  },
      ....
  </code></pre>
  <blockquote>
  <p>My HTML block was assigned to this  <code>var htmlwid = $(&quot;#re-sidecart-item-template&quot;).html();</code></p>
  </blockquote>
  <pre><code>&lt;div id=&quot;re-sidecart-item-template&quot; class=&quot;hide&quot;&gt;
      &quot;&lt;div class=cart-product row id=&quot; + element.id + &quot;&gt;&quot;
          &lt;div class=&quot;col-lg-3 col-md-3 col-sm-4 product-img&quot;&gt;
              &lt;div class=&quot;image&quot;&gt;
                  &lt;div class=&quot;aspect-container&quot;&gt;
                      &lt;img src=&quot;element.img&quot; alt=&quot;element.handle&quot; loading=&quot;lazy&quot; /&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=&quot;col-lg-8 col-md-8 col-sm-7 product-info&quot;&gt;
              &lt;div class=&quot;product-title&quot;&gt;
                  &lt;a href=&quot;/pages/program&quot; target=&quot;_blank&quot;&gt;element.title element.price/mo.&lt;/b&gt;&lt;/a&gt;
              &lt;/div&gt;             
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I want to take the element values from the responses, it basically not working the way it should.</p>