Re: How to select values in a JSON type of column?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: How to select values in a JSON type of column?
Дата
Msg-id CAKFQuwYVfGGHem7f06Hn=Ex5ZMNCkoPGf4c7EoUiittm8M1hgg@mail.gmail.com
обсуждение исходный текст
Ответ на How to select values in a JSON type of column?  (Snjezana Frketic <frketic.snjezana@gmail.com>)
Ответы Re: How to select values in a JSON type of column?  (Snjezana Frketic <frketic.snjezana@gmail.com>)
Список pgsql-general

On Wednesday, November 18, 2020, Snjezana Frketic <frketic.snjezana@gmail.com> wrote:


SELECT targeting#>'{targets,0,audienceSegments,0,includes,0,segments,allOf,0,ids}'FROM campaigns;  

and that works, but, I don’t want to have a fixed path because positions could change like 0 could become 1includes and excludes could change positions, allOf  could be anyOf etc.
Any idea of how to always select ids in includes no matter the changes?

  Maybe it can be done using json path:


David J.

В списке pgsql-general по дате отправления:

Предыдущее
От: Ravi Krishna
Дата:
Сообщение: Re: vacuum vs vacuum full
Следующее
От: Snjezana Frketic
Дата:
Сообщение: Re: How to select values in a JSON type of column?