Filtering the response of ajax
<p>I am trying to filter the ajax response so that I get content of a specific div tag. But it returns empty always. Here is the jquery snippet. Any idea what could be wrong.</p>

<pre><code>$(document).ready(function(){
   $.ajax({
    url:"/testjson.jsp",
    success:function(result){
         var html=result;
         var a=&lt;%=compid%&gt;.id;// gives the div id - jsonoutd36fd7bd8074e310RECID
         alert(a);// This alerts the div id
         var htmlFiltered = $(html).find($(a)).text();
         alert(htmlFiltered);// This alerts empty.

   }});
});
</code></pre>
