return jsonb without field label

From: "john(dot)tiger" <john(dot)tigernassau(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: return jsonb without field label
Date: 2015-07-04 01:28:08
Message-ID: 559736A8.4060104@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

have tables with : create table mydocs (id serial primary key, data jsonb)

when I do a select data from mydocs it comes back as {data: {my jsonb
fields}} which then gets passed into a template - don't want to have to
keep using <%= article.data.name %> instead of just data.name

probably easy but can't find out how - any suggestions?

ps: using new pg very lite orm library massive.js (npm massive) - easy
to run direct sql commands - very nice.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Charles Clavadetscher 2015-07-04 05:20:50 Re: Download PostgreSQL 9.5 Alpha
Previous Message Joshua D. Drake 2015-07-04 00:24:38 Re: Download PostgreSQL 9.5 Alpha