Search Postgresql Archives

return jsonb without field label

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux