Hi,
This says if matched found or not against the input array :
'{"a":1, "b":2, "c":3}'::jsonb ?| array['b', 'c']
But how would I determine how many matched ? Like for the above example, I see only 2 matched found.
--
================
Regards,
Arup Rakshit
================
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as
possible,you are, by definition, not smart enough to debug it.
--Brian Kernighan
On Sun, May 31, 2015 at 11:07 PM, Arup Rakshit
<aruprakshit@rocketmail.com> wrote:
> Hi,
>
> This says if matched found or not against the input array :
>
> '{"a":1, "b":2, "c":3}'::jsonb ?| array['b', 'c']
>
> But how would I determine how many matched ? Like for the above example, I see only 2 matched found.
You could use "?" to do the check for each individual key, and then
count how many matched...
--
Michael
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера