I have a column of type jsonb
that stores objects in an array.
I can get the key template
of all index objects 0
like this:
psql=# select data->'components'->0->'template' as template from page;
that returns:
template
-------------------------------------
"nome-do-template"
//etc
(100 rows)
How can I do to search for the key template
of all objects at the same time without specifying the index?
EDIT: stored array example:
[
{
"type": "feed",
"template": "_vertical-content",
},
{
"type": "feature",
"template": "_single-content",
}
]