title: How to get size of jQuery object
body: <p>I'm saving key-value pairs in div container by using: </p>
  
  <pre><code>$( '#div_id').data( key, value);
  </code></pre>
  
  <p>At the end I need to check if anything is stored in this div container.</p>
  
  <p>So first I get the content by calling: </p>
  
  <pre><code>var data = $( '#div_id').data();
  </code></pre>
  
  <p>Then to check its size with data.length or data.size.</p>
  
  <p>But both functions don't exists. As I know the data function in jquery returns an object, so I should be able to get the size of this object.</p>
  
  <p>How do I get the size of the object returned by the data function in jquery?</p>