title: checking json array with postgres
body: <p>I have an JSONB array in postgres in the follow format.</p>
  
  <pre><code>{
     "id" : 22323,
     "details" : [
                          {
                              "status" : "stage1",
                               "timestamp" : "2017-09-89"
                           },
                          {
                              "status" : "stage2",
                               "timestamp" : "2017-09-89"
                           }
                          ]
      }
  </code></pre>
  
  <p>I need to get the timestamp at stage2, how do I select the particular status's timestamp in postgresql ?</p>