Remove the deeper jsonb element in Postgres [ 
   { 
      "type":"test.added",
      "values":[ 
         { 
            "field":"field1",
            "value":"fieldValue1"
         },
         { 
            "field":"field2",
            "value":"fieldValue2"
         }
      ]
   }
]


I want to remove the 'field1' object pair from the JSON in postgres

Here is what I have tried so far,


updatedJson -&gt; 0 -&gt;&gt; 'values' - '"field1"'
i tried using the #- Delete the field or element with specified path
(for JSON arrays, negative integers count from the end)


Both steps didn't help me. I am new to Postgres. Is there any way like getting the path and deleting it. I am using jsonb. PostgreSQL version: 9.6.
Kindly help
i tried using the #-


What specifically did you try?

Using #- works for me, specifically updatedJson #- '{0,values,0}'