title: How to display an php object using jquery
body: <p>I'm developing a joomla component and i'm using AJAX on my view for fetching database table content by sending get request to controller and then by creating a data object of model i called the a function in my model which in turn returns a JSON object.<br>
  Now my problem is to display that object's content in a html table through jQuery.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>jQuery("#papertitle").change(function(){
              console.log('eneterd jquery function');
              var title =jQuery('#papertitle').val();
  
              jQuery.ajax({
              type: 'GET',
              url: "http://localhost/joomladev/index.php?option=com_journals&amp;task=payments&amp;format=raw&amp;title="+title,
              data: {title : title},
              success: function(data){
                  console.log('data',data);
                  jQuery('#data-table').html(data);   
              }
          });
  
      });
  </code></pre>
  
  <p>where data-table is my div. And it is showing JSON object as output like this:</p>
  
  <pre><code> array (size=1)
    0 =&gt; 
      object(stdClass)[165]
        public 'paperid' =&gt; string '4' (length=1)
        public 'journalid' =&gt; string '7' (length=1)
        public 'papertitle' =&gt; string 'Big Data' (length=8)
        public 'classification' =&gt; string 'computer science' (length=16)
        public 'status' =&gt; string 'complete' (length=8)
        public 'comments' =&gt; string 'none' (length=4)
  </code></pre>
  
  <p>But I want the object details to be shown in form of a table.
  Any suggestions on how can i do it with jQuery!!</p>