title: returning users count more than expected
body: <p>I am returning rows from a database table which I am serializing to json so as to display the results by making an ajax call.</p>
  
  <p>When I view the results in my chrome console it looks correct but when I try to display it or do a count it returns way more than expected.</p>
  
  <pre><code>$id = $_POST['userId'];
  $query = "SELECT * FROM users";    
  $result = mysqli_query($connection, $query);
  if (!$result) {
      die("Database connection failed");
  }
  $results = array(); 
  foreach($result as $row){
     $user_id = $row['id'];
     $user_username = $row['username'];
     $user_name = $row['name'];       
     $results[] = array('$id'=&gt; $user_id, '$username' =&gt; $user_username,'$name' =&gt; $user_name);        
  }
  echo json_encode($results);
  </code></pre>
  
  <p>front-end</p>
  
  <pre><code> $.ajax({
                  type: "POST",
                  url: 'deleteUser.php',
                  data: {userId: userId},
                  success: function (data) {
                      container.Users = data;
                      console.log(container.Users.length);//returns a count of 773
                      console.log(container.Users);
                  }
              });
  </code></pre>
  
  <p>However, the correct json does seem to be returned but when I try to render it in my page with an underscore template it returns 773 rows without displaying any values.</p>
  
  <pre><code> &lt;table class="table table-bordered"&gt;
              &lt;% _.each (container.Users, function(user) {%&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;%= user.$id %&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%= user.$username %&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%= user.$name %&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;input type='button' class='btn btn-primary btn-sm' name='delete' value='Delete' data-iddelete=$id id = &lt;%= user.$id %&gt;&gt;&lt;/td&gt;               
              &lt;/tr&gt;
              &lt;% }); %&gt;
  
          &lt;/table
  </code></pre>
  
  <p>What is wrong with my code?</p>