title: How to validate that the properties of an object are empty in javascript
body: <p>I would like to validate if my object in its properties are empty or null.</p>
  <pre><code>    const references = {
        reference1 : {
            &quot;name&quot; : &quot;&quot;,
            &quot;phone&quot; : &quot;&quot;
        },
        reference2 : {
            &quot;name&quot; : null,
            &quot;phone&quot; : null
        }  
     }
  </code></pre>
  <p>I have tried to do the following but it is not what I am really looking for</p>
  <pre><code>console.log(Object.keys(references.reference1).lenght == 0)
  </code></pre>