title: Rails access hash value
body: <p>I'm playing around with Netflix's <a href="https://github.com/Netflix/Workflowable" rel="nofollow">Workflowable</a> gem. Right now I'm working on making a custom action where the user can choose choices.</p>
  
  <p>I end up pulling <code>{"id":1,"value":"High"}</code> out with <code>@options[:priority][:value]</code></p>
  
  <p>What I want to do is get the id value of 1. Any idea how to pull that out? I tried <code>@options[:priority][:value][:id]</code> but that seems to through an error.</p>
  
  <p>Here's what the action looks like/how I'm logging the value:</p>
  
  <pre><code>class Workflowable::Actions::UpdateStatusAction &lt; Workflowable::Actions::Action
    include ERB::Util
    include Rails.application.routes.url_helpers
  
    NAME="Update Status Action"
    OPTIONS = {
        :priority =&gt; {
          :description=&gt;"Enter priority to set result to",
          :required=&gt;true,
          :type=&gt;:choice,
          :choices=&gt;[{id: 1, value: "High"} ]
        }
      }
  
    def run
      Rails.logger.debug @options[:priority][:value]
    end
  
  end
  </code></pre>
  
  <p>Here's the error:</p>
  
  <pre><code>Error (3a7b2168-6f24-4837-9221-376b98e6e887): TypeError  in ResultsController#flag
  no implicit conversion of Symbol into Integer
  </code></pre>
  
  <p>Here's what <code>@options[:priority]</code> looks like:</p>
  
  <pre><code>{"description"=&gt;"Enter priority to set result to", "required"=&gt;true, "type"=&gt;:choice, "choices"=&gt;[{"id"=&gt;1, "value"=&gt;"High"}], "value"=&gt;"{\"id\":1,\"value\":\"High\"}", "user_specified"=&gt;true}
  </code></pre>