CREATE TABLE posts ( id serial NOT NULL, meta JSON );
INSERT INTO posts (id, meta) VALUES ( 1, '{ "author": "outsider", "authorId": 43434, "sns": { "facebook": "https://facebook.com", "twitter": "https://twitter.com" }, "createAt": "2014-06-14", "category": ["pg", "tech", "dev"] }' );
SELECT meta->'author' FROM posts; -- "outsider" SELECT meta->'sns'->'facebook' FROM posts; -- "https://facebook.com" SELECT meta->'sns'->>'facebook' FROM posts; -- https://facebook.com SELECT meta#>'{category, 2}' FROM posts; -- "dev"