title: JSON key/value pair plus count
body: <p>I need to return json data from the server, which can be used on the client side and I am not sure the best way to format the json data.</p>
  
  <p>So basically, What is the best way to format the json data to include:</p>
  
  <ol>
  <li>key/value pairs so they can be looped through at clientside (loop via jquery),</li>
  <li>a count of the number of id/value pairs which can be used at clientside for other purposes (used via jquery).</li>
  </ol>