SELECT my_jsonb #- '{spec,buildings,0,equipment,selected_inverters}') #- '{spec,buildings,1,equipment,selected_inverters}' AS my_jsob FROM my_table
This feels like a nasty solution, more so.. I may have various number of dicts in the buildings array.
Does anyone have some ideas on how I could implement something like the following?
SELECT my_jsonb #- '{spec,buildings,*,equipment,selected_inverters}') AS my_jsob FROM my_table
I took a look at your json and query and I can't figure out what your SQL select is actually doing. It seems to return the exact same results as a straight query of your original data?