title: Manipulating Output from an Array of Nested Hashes in Ruby
body: <p>I've been pulling data from an API in JSON, and am currently stumbling over an elmementary problem </p>
  
  <p>The data is on companies, like Google and Facebook, and is in an array or hashes, like so: </p>
  
  <pre><code>[
    {"id"=&gt;"1", "properties"=&gt;{"name"=&gt;"Google", "stock_symbol"=&gt;GOOG, "primary_role"=&gt;"company"}},
    {"id"=&gt;"2", "properties"=&gt;{"name"=&gt;"Facebook", "stock_symbol"=&gt;FB, "primary_role"=&gt;"company"}}
  ]
  </code></pre>
  
  <p>Below are two operations I'd like to try:</p>
  
  <ol>
  <li>For each company, print out the name, ID, and the stock symbol (i.e. "Google - 1 - GOOG" and "Facebook - 2 - FB") </li>
  <li>Remove "primary role" key/value from Google and Facebook </li>
  <li>Assign a new "industry" key/value for Google and Facebook </li>
  </ol>
  
  <p>Any ideas? </p>
  
  <p>Am a beginner in Ruby, but running into issues with some functions / methods (e.g. undefined method) for arrays and hashes as this looks to be an array OF hashes  </p>
  
  <p>Thank you! </p>