How to determine if a Javascript object has only one specific key-value pair?
<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 'id' : 'message'</p>
