title: How to determine if a Javascript object has only one specific key-value pair?
body: <p>What would be the easiest way to determine if a Javascript object has only one specific key-value pair?</p>
  
  <p>For example, I need to make sure that the object stored in the variable <code>text</code> only contains the key-value pair <code>'id' : 'message'</code></p>