Comparing a Cucumber Data Table to Ruby Array of Hashes
<p>I am trying to compare data from a cucumber table to an array of hashes. </p>

<pre><code> Cucumber step: 

 Then I expect tasks created with:
      | issuetype | summary       | status | 
      | Task      | Please review | To do  | 
      | Task      | Please review | To do  |
</code></pre>

<p>I turned the table into a hash using: </p>

<pre><code>Then (/^I expect tasks created with:/) do |table| 
  table = table.hashes
end 


 [{"issuetype"=&gt;"Task", 
   "summary"=&gt;"Please review", 
   "status"=&gt;"To do", 
   "assignee"=&gt;"unassigned", 
   "assigned group"=&gt;"rm-group1"}, 
  {"issuetype"=&gt;"Task", 
   "summary"=&gt;"Please review", 
   "status"=&gt;"To do", 
   "assignee"=&gt;"unassigned", 
   "assigned group"=&gt;"rm-group2"}]
</code></pre>

<p>How can I select the values (<code>issuetype</code>, <code>summary</code>, <code>status</code>) from the data underneath, which is is a JSON  parse and  format it like the <code>table.hashes</code> above and compare them? </p>

<pre><code>tasks [ {
      id: 1
      fields:{ 
           summary: "Summary"
      } 
           status:{
                 description: "description"
                 currentstatus: "To do"
             }
            issuetype{ 
                  id: "5"
                  name: "sub-task"
             }
           }]
</code></pre>