Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XLHmG-0003UZ-U2 for pgsql-sql@arkaria.postgresql.org; Sat, 23 Aug 2014 20:19:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XLHmF-0007aC-MC for pgsql-sql@arkaria.postgresql.org; Sat, 23 Aug 2014 20:19:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XLHmD-0007Zy-NS for pgsql-sql@postgresql.org; Sat, 23 Aug 2014 20:19:05 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XLHm3-0001k1-Oo for pgsql-sql@postgresql.org; Sat, 23 Aug 2014 20:19:03 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XLHm0-0004g5-Ba for pgsql-sql@postgresql.org; Sat, 23 Aug 2014 13:18:52 -0700 Date: Sat, 23 Aug 2014 13:18:52 -0700 (PDT) From: David G Johnston To: pgsql-sql@postgresql.org Message-ID: <1408825132229-5816009.post@n5.nabble.com> In-Reply-To: References: Subject: Re: postgres json: How to query map keys to get children MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org 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. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql