[jq] Delete a key from an object

Created on November 30, 2026

Use del with the path to remove a key from a JSON object. Here, del(.password) removes the password key.

echo '{"name":"Taro","password":"secret","age":20}' | jq 'del(.password)'

Output

{
  "name": "Taro",
  "age": 20
}
jq