title: JQuery returning [object Object]
body: <p>I'm doing an calendar, and i created a page to show the events from a certain day.</p>
  
  <p>I'm using Ajax because i dont want my users to reload the page everytime that a new event is created.</p>
  
  <p>So, i'm using Json encode to get the values from an array, and everytime that i print a day with two events, i receive this:</p>
  
  <pre><code>[{"event_day":"9","event_name":"test"}, {"event_day":"9","event_name":"test2"}]
  </code></pre>
  
  <p>But when i try to print the elements in JQuery to put inside an element, i receive [object Object]</p>
  
  <p>I inserted the array inside a while loop because i'm getting multiple rows from my database table.</p>
  
  <p><strong>PHP function</strong></p>
  
  <pre><code>function eventPrint($list_day, $month, $year){
  
  $select = mysql_query("SELECT * FROM events WHERE event_day = '".$list_day."' AND event_month = '".$month."' AND event_year = '".$year."'") or die(mysql_error());
  
  $data = array();
  while($row = mysql_fetch_assoc($select)) {
  $event_day = $row['event_day'];
  $event_name = $row['event_name'];
  
     $data[] = array('event_day' =&gt; $event_day,
      'event_name' =&gt; $event_name
      );
  
  }
  
  echo json_encode($data);
  
  }
  </code></pre>
  
  <p><strong>Ajax</strong></p>
  
  <pre><code>$.ajax({
      type: 'get',
      url: "modules/groups/new.php",
      data: {
          'list_day': getday,
          'month': getmonth,
          'year': getyear,
          'action': 'selection'
      },
      success: function (response) {
          var obj = jQuery.parseJSON(response);
  
          $('.' + getmonth).html(obj.event_day);
      }
  });
  </code></pre>