title: How to print json array using jquery ajax?
body: <p>i am stuck at some json parsing, i am populating some fields using jquery's ajax function, i found the desired result, but dont know how to print it, here is my code</p>
  
  <pre><code>function logged_in_users() {
      $.ajax({
          url: site_url+'user/get_loggedin_users',
          dataType : 'json',
          success: function(result) {
              $('#div_id').append(result.email_address)
          }
      }); 
  }
  </code></pre>
  
  <p>while i have a result in my console response like, </p>
  
  <pre><code>[{"email_address":"abc@yahoo.com"},{"email_address":"abc@gmail.com"}]
  </code></pre>
  
  <p>while on the function side i am using,</p>
  
  <pre><code>echo json_encode($this-&gt;login_history_model-&gt;get_logged_in_users());
  </code></pre>
  
  <p>Any help will greatly be appreciated</p>