how to load an array variable into a div - ajax
<p>I have a <code>div</code> like below :</p>

<pre><code>&lt;div id="#myid"&gt;
if($values){
    echo "&lt;p&gt;$values['one']&lt;/p&gt;";
    echo "&lt;p&gt;$values['two']&lt;/p&gt;";
}
&lt;/div&gt;
</code></pre>

<p>because my div is big, I would like to send a request to server and load response it into my <code>div</code> :</p>

<pre><code>$.post('myurl', {target:target} , function(data){
    $('#myid').???(data);
});
</code></pre>

<p>I don't want to override all content of my <code>div</code>. I just want to pass an array(or anything like an array example <code>json</code>) variable to my <code>div</code>. how can I do?</p>

<p>my <code>div</code> content :</p>

<pre><code>&lt;div id="product-quick-view-add-to-cart" class="mfp-with-anim mfp-hide mfp-dialog mfp-dialog-big clearfix"&gt;
     &lt;div class="row"&gt;
        &lt;div class="col-md-9"&gt;
            &lt;small&gt;&lt;a class="text-muted float-to-right" href="#"&gt;$val1&lt;/a&gt;&lt;/small&gt;
            &lt;br /&gt;
            &lt;h3 class="float-to-right"&gt;$val2&lt;/h3&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;p class="text-smaller text-muted float-to-right"&gt;$val2 &lt;/p&gt;
        &lt;/div&gt;
        &lt;div class="col-md-3"&gt;
            &lt;div class="fotorama" data-nav="thumbs" data-allowfullscreen="1" data-thumbheight="50" data-thumbwidth="50"&gt;
                &lt;img src="$val3" alt="Image Alternative text" title="Gamer Chick" /&gt;
            &lt;/div&gt;
        &lt;/div&gt;

    &lt;/div&gt;
    &lt;div class="row"&gt;
        &lt;div class="col-md-10"&gt;
            &lt;hr class="hr-mt-5-mb-10" /&gt;
            &lt;span&gt;
                &lt;div class="col-md-4 text-align-center"&gt;
                    &lt;p&gt;$val4&lt;/p&gt;
                    &lt;p&gt;$val5&lt;/p&gt;
                &lt;/div&gt;
            &lt;/span&gt;
            &lt;span&gt;
                &lt;div class="col-md-4 text-align-center"&gt;
                    &lt;p&gt;$val6&lt;/p&gt;
                    &lt;p&gt;$val7&lt;/p&gt;
                &lt;/div&gt;
            &lt;/span&gt;
            &lt;span&gt;
                &lt;div class="col-md-4 text-align-center"&gt;
                    &lt;p&gt;val&lt;/p&gt;
                    &lt;p&gt;$val8&lt;/p&gt;
                &lt;/div&gt;
            &lt;/span&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;hr/&gt;&lt;a class="btn btn-primary" href="#"&gt;add&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>Someone suggested to me that I use <code>angularjs</code> framewrok. but I don't know that is best solution.</p>