How to retrieve a data from inside a json postgres

Viewed 11610

In my database table I have a column named data and that column's type is jsonb. Here is a sample json of the column.

{"query": {"end-date": "2016-01-31", "start-date": "2016-01-01", "max-results": 1000, "start-index": 1 }}

This is the result in a formal format.

{
  "query":{
    "end-date":"2016-01-31",
    "start-date":"2016-01-01",
    "max-results":1000,
    "start-index":1
  }
}

I need to get the data from the 'start date' inside the 'query' element. How get the data from the start date from a pgsql query

1 Answers
Related