Select records based on property values in a JSONB array?
Created by: jnystrom
I have a Customer record, and I have a phone_numbers
column that is a JSONB field (in a table that has other relational data) that is an array of JSON objects:
[
{"number":"1231231234", "is_primary":true, "type":"cell"},
{"number":"1231231235", "is_primary":false, "type":"hone"},
],
and I would like to get all customers who have number in ["1231231234", "4564564567]
. I see you have a nice wrapper that works for objects in that field:
.find({'phones->>number': customer.phones}
, is there anything that in in Massive to help with arrays in the JSONB column?