title: parsing html data returned by ajax and get the value of a div
body: <p>I am not an expert in jquery and ajax, (sorry if I bother you),  I have checked in internet and cannot find a simple response. </p>
  
  <p>I'm interesting in the html data returned from ajax call that contains<br>
  ...</p>
  
  <pre><code>&lt;p id="id_comment"&gt; 29 &lt;p&gt;
  </code></pre>
  
  <p>...</p>
  
  <p>I would like to simply get the value 29 in a variable.</p>
  
  <p>I did </p>
  
  <pre><code>$result = $(data).find("#id_comment");    ---  $result is an object
  </code></pre>
  
  <p>how can I simply get the value 29 in a variable?</p>
  
  <p>Thanks</p>
  
  <p><strong>--- EDIT</strong></p>
  
  <pre><code>array(
              'context'   =&gt; 'js:this',
                  'data'      =&gt; array(),
                  'type'      =&gt; 'POST',
                  'success'   =&gt; 'js:function(data){
  
                  alert(data);   --&gt; return the entire html
  
                              $result = $(data).find("#id_comment").text();
  
                              alert ($result);  --&gt; return nothing
  </code></pre>