title: Rails JSON query combined with other data types
body: <p>I have a Contact model with a string and json attribute
  the string attribute stores the phone_number and the json attribute stores some other data.</p>
  
  <p>I want to run a query like this</p>
  
  <pre><code>Contact.exists?(phone_number: '+255788778899', data: {name: 'Gamma',   
  region: 'The Great one'})
  </code></pre>
  
  <p>I have searched all over google and SO, but most of the articles simple give a way of find the record with a json string only and which has only one key </p>
  
  <p>e.g </p>
  
  <pre><code>Contact.exists?("data -&gt;&gt; 'name' = 'Gamma'")
  </code></pre>
  
  <p>However my intention is to find if a contact exists with the phone number and the full json attribute specified in the same query</p>
  
  <p>How can I do this?</p>