title: Targeting an array of objects in JavaScript
body: <p>I have a value in this format:</p>
  
  <pre><code>var state = [{"industry-type":"football","your-role":"coach"}]
  </code></pre>
  
  <p>I would like to output "football". How can I do this?</p>
  
  <p>I've tried <code>state[0].industry-type</code> but it returns an error:</p>
  
  <pre><code>Uncaught ReferenceError: type is not defined
  </code></pre>
  
  <p>Any help appreciated.</p>