set val of html string in jquery loop with val()
<p>How do I take this string v that is in a loop and use jquery to add the value to the input id "MyInput"</p>

<p>Here is a simplified version of my code</p>

<pre><code>var d='';

    $.each(row,function(i,v){

        //v = &lt;div&gt;&lt;p&gt;gxsfsd&lt;/p&gt;&lt;p&gt;gxsfsd&lt;/p&gt;&lt;input  type="hidden" id="Myinput" /&gt;&lt;p&gt;gxsfsd&lt;/p&gt;&lt;p&gt;gxsfsd&lt;/p&gt;&lt;p&gt;gxsfsd&lt;/p&gt;&lt;/div&gt;"

    $(v).find("#MyInput").val("text set 1");

    d+= v;

    });
</code></pre>
