Prism · Objects
$omit
Drops the named keys of an object and keeps the rest.
{
user: {
id: 'u_42',
name: 'Ada Lovelace',
email: '[email protected]',
passwordHash: 'sekret-do-not-share',
sessionToken: 'also-sekret',
createdAt: '2024-01-01',
},
}{
$omit: {
from: { $ref: '$.user' },
keys: ['passwordHash', 'sessionToken'],
},
}{
id: 'u_42',
name: 'Ada Lovelace',
email: '[email protected]',
createdAt: '2024-01-01',
}Runs in this page on the installed package. The input and the expected output are defined by the example.