title: Parse JSON with an array in Rails
body: <p>I have the following JSON string returned by a remote server:</p>
  
  <pre><code>{
    "users": [
      {
        "user_id": 1,
        "name": "Chris Rivers",
      },
      {
        "user_id": 3,
        "name": "Peter Curley",
      }
    ]
  }
  </code></pre>
  
  <p>I'd like to iterate the users.</p>
  
  <pre><code>ActiveSupport::JSON.decode(response.body)["users"].each do |user|
      puts user["name"]
  end
  </code></pre>
  
  <p>As far as I understand, the problem is: ruby doesn't recognize <code>ActiveSupport::JSON.decode(response.body)["users"]</code> as an array, and thus <code>puts</code> returns me only the first user.</p>
  
  <p>How do I solve that problem?</p>