json - Searching for a particular value in a jsonb datatype prostgresql -


we storing dynamic json data postgresql jsonb datatype field. of json keys dynamic , nested.

now need search 1 particular value inside json data field. value may present key name.

row1 = { "header": { "piecesids" : [100,200,300] }, "footer" : {"pieceids" : [500,300]} }

row2 = { "header_right": { "piecesids" : [500,300,400] }, "footer_left" : {"pieceids" : [300,200]} }

row3 = { "body_right": { "piecesids" : [500,300,600] }, "body_left" : {"pieceids" : [300]} }

i need rows pieceid 200 present means want row1 & row2 returned.

i have gone through several blogs, mentions how can search key not value.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -