title: How To Access JSON Keys With Hyphen
body: <p>Normally, we access json object elements using dot notation i.e. <code>var obj = {"key": "value"}; var val = obj.key;</code>. How do we access the value in case of <code>var obj = {"key-with-hyphens": "value"};</code>? Do I have to revert to [] i.e. <code>var val = obj['key-with-hyphens'];</code>?</p>