title: How to append data attribute value in p tag dynamically
body: <p>&quot;&lt;div class=&quot;text&quot; data-name=&quot;test1&quot;&gt; &lt;/div&gt;&quot;<br />
    &lt;div class=&quot;text&quot; data-name=&quot;test1&quot;&gt; &lt;/div&gt;<br />
    &lt;div class=&quot;text&quot; data-name=&quot;test1&quot;&gt; &lt;/div&gt;<br />
    &lt;div class=&quot;text&quot; data-name=&quot;test1&quot;&gt; &lt;/div&gt;<br />
    &lt;div class=&quot;text&quot; data-name=&quot;test1&quot;&gt; &lt;/div&gt;</p>
  
  <p>append should like this </p>
  
  <p>&lt;div class=&quot;text&quot;&gt; &lt;p&gt;test 1&lt;/p&gt;&lt;/div&gt;<br />
    &lt;div class=&quot;text&quot;&gt; &lt;p&gt;test 2&lt;/p&gt;&lt;/div&gt;</p>