Re: postgres json: How to query map keys to get children

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: postgres json: How to query map keys to get children
Дата
Msg-id 1408825132229-5816009.post@n5.nabble.com
обсуждение исходный текст
Ответ на postgres json: How to query map keys to get children  (Hector Menchaca <hm34306@hotmail.com>)
Ответы Re: postgres json: How to query map keys to get children  (Hector Menchaca <hm34306@hotmail.com>)
Список pgsql-sql
Hector Menchaca wrote
>  json_array_elements(ResourceDocument->'Skill'->*)

NOT TESTED (or complete)

SELECT skill_type.value->'Name'
FROM (
SELECT * FROM json_each(rd->'Skill')
) skill_type

Because you want columns for Name, etc, you must list those explicitly
instead of using json_each over those.

David J.



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/postgres-json-How-to-query-map-keys-to-get-children-tp5816001p5816009.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



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

Предыдущее
От: Hector Menchaca
Дата:
Сообщение: postgres json: How to query map keys to get children
Следующее
От: Hector Menchaca
Дата:
Сообщение: Re: postgres json: How to query map keys to get children