This is the next question to this:
How to select only json part stored in Postgres using ActiveRecord
Say I have a User model that has a json type field called settings . Suppose this field looks something like this:
{ color: 'red', language: 'English', subitems: { item1: true, item2: 43, item3: ['foo', 'bar', 'baz'] } }
The difference in the question mentioned above is that I would like to know how to exclude the json part. So here I want to highlight everything from settings , except:
subitems: { item1: true, item2: 43, item3: ['foo', 'bar', 'baz'] }
source share