The following bug has been logged on the website:
Bug reference: 13506
Logged by: Grégoire HUBERT
Email address: gregoire(dot)hubert(at)pragmafabrik(dot)com
PostgreSQL version: 9.5alpha1
Operating system: debian jessie
Description:
select val->'a'||val->'c' from (values ($j${"a": {"b": 2}, "c": {"d":
3}}$j$::jsonb)) a (val);
┌──────────┐
│ ?column? │
├──────────┤
│ {"d": 3} │
└──────────┘
(1 row)
I think this should return '{"b": 2, "d": 3}'