Re: [GENERAL] How to search a string inside a json structure

2015-11-06 Thread Sami Pietilä
Hi, I have simplified the case and tried to look from a list of json items (please see test table content). I think I have managed to unpack values in such a way that also partial matching is possible. However, the end result has two "value" named columns even if I have tried to rename them. How

Re: [GENERAL] How to search a string inside a json structure

2015-11-03 Thread Sami Pietilä
Hi, Thank you for reply. I think I need to do some more research of means to implement searching for json databases. I'll look the module. Thanks 2015-11-03 18:43 GMT+02:00 Merlin Moncure : > On Tue, Nov 3, 2015 at 9:57 AM, Vick Khera wrote: > > > > On Tue, Nov 3, 20

Re: [GENERAL] How to search a string inside a json structure

2015-11-03 Thread Sami Pietilä
Hi, Thank you for reply! I am using version 9.4.5. Unfortunately I could not figure out how to select rows which, for example, contain following json: '{"a":"world","c":{"b":"helloworld"}}' by search with "hello" string. I am trying to create a query which looks values in any field in JSON, "a"

[GENERAL] How to search a string inside a json structure

2015-11-02 Thread Sami Pietilä
Hi, I have a database with jsonb type of columns. Colums contain complex json structures. I would like to get all rows which contain a json where any of json's values matches to a given string (like %hello%). How to create a postgre sql query to do this? I guess postgre should traverse though ea