I have a jsonb value like this in my Postgres database:
{
"data":[
[
{
"id":"identity_phone_1",
"type":"string",
"class":"col-md-6",
"label":"Téléphone",
"value":"tamereenslip"
},
{
"id":"identity_imei_1",
"type":"string",
"class":"col-md-6",
"label":"IMEI",
"value":"d"
}
],
[
{
"id":"identity_phone_2",
"type":"string",
"class":"col-md-6",
"label":"Téléphone",
"value":"e"
},
{
"id":"identity_imei_2",
"type":"string",
"class":"col-md-6",
"label":"IMEI",
"value":"f"
}
]
]
}
I need to access automatically to all of the value field. For now I find the right command but it's not automatic, I need the 0's to increment automatically, is it possible?
phones #>> '{data, 0, 0, value}'
Edit : I want to retrieve all the values in one command :
tamerenslip, d, e, f
Also, I need to put this command in a select :/