title: Finding the number of keys in an object
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/126100/how-to-efficiently-count-the-number-of-keys-properties-of-an-object-in-javascrip">How to efficiently count the number of keys/properties of an object in JavaScript?</a>  </p>
  </blockquote>
  
  
  
  <pre><code>var values = [{
      'SPO2': 222.00000,
      'VitalGroupID': 1152,
      'Temperature': 36.6666666666667,
      'DateTimeTaken': '/Date(1301494335000-0400)/',
      'UserID': 1,
      'Height': 182.88,
      'UserName': null,
      'BloodPressureDiastolic': 80,
      'Weight': 100909.090909091,
      'TemperatureMethod': 'Oral',
      'Resprate': null,
      'HeartRate': 111,
      'BloodPressurePosition': 'Standing',
      'VitalSite': 'Popliteal',
      'VitalID': 1135,
      'Laterality': 'Right',
      'HeartRateRegularity': 'Regular',
      'HeadCircumference': '',
      'BloodPressureSystolic': 120,
      'CuffSize': 'XL'
  }];
  
  for (i=0; i &lt; values.length; i++) {
          alert(values.length) // gives me 2. 
  </code></pre>
  
  <p>How can find how many keys my object has?</p>