title: Deep nested hash difference in Ruby
body: <p>I wants find the difference between two different Hash.</p>
  
  <pre><code>a = {"3"=&gt;{"passenger_type"=&gt;"ADT", "the_order"=&gt;"3", "last"=&gt;"ARUN", "first"=&gt;"KUMAR", "middle"=&gt;nil}, "2"=&gt;{"passenger_type"=&gt;"ADT", "the_order"=&gt;"2", "last"=&gt;"JONES", "first"=&gt;"MAXIM", "middle"=&gt;nil}, "1"=&gt;{"passenger_type"=&gt;"ADT", "the_order"=&gt;"1", "last"=&gt;"RAM", "first"=&gt;"TODD", "middle"=&gt;nil}}
  
  b = {1=&gt;{"middle"=&gt;nil, "the_order"=&gt;"1", "passenger_type"=&gt;"BDT", "last"=&gt;"RAM", "first"=&gt;"TODD"}, 2=&gt;{"middle"=&gt;nil, "the_order"=&gt;"2", "passenger_type"=&gt;"ADT", "last"=&gt;"JONES", "first"=&gt;"MAXIM"}, 3=&gt;{"middle"=&gt;nil, "the_order"=&gt;"3", "passenger_type"=&gt;"ADT", "last"=&gt;"ARUN", "first"=&gt;"KUMAR"}}
  </code></pre>
  
  <p>and the resultant hash or array should be like the following</p>
  
  <pre><code>{1=&gt;{"middle"=&gt;nil, "the_order"=&gt;"1", "passenger_type"=&gt;"BDT", "last"=&gt;"RAM", "first"=&gt;"TODD"}}
  </code></pre>