title: Query the element in Array inside JSON column
body: <p>I have a jason column in my postgress sql Database. I have several properties in that jason column. I can search properties using below query.</p>
  
  <pre><code>SELECT *  FROM public.object_reference where value-&gt;&gt;'name' = 'Sam' and value-&gt;&gt;'address' ='home';
  </code></pre>
  
  <p>But my problem is I have a Array inside that JSON column. That Array has key and value pair. Below is the sample of that array</p>
  
  <pre><code>"attributes": [ {
      "value": "Sam",
      "key": "name"
  }, {
      "value": "abc",
      "key": "address"
  }, {
      "value": "Singapore",
      "key": "country"
  }, {
      "value": "97813245",
      "key": "mobile"
  }, {
      "value": "Engineer",
      "key": "position"
  },
  "id": "1312312",
  "type": "Job",
  "classid": "1245568956643546788907634"
  </code></pre>
  
  <p>}</p>
  
  <p>So i need to get the value of name in the attributes array (inside JSON column). This is <code>json</code> type column, not a <code>jsonb</code> type. </p>