Prism · Logic
$or
Gives its first truthy operand, or the last one when none is, and evaluates no further than that.
{ user: { nickname: null, name: 'Ada' } }{
$or: [{ $ref: '$.user.nickname' }, { $ref: '$.user.name' }],
}'Ada'
Runs in this page on the installed package. The input and the expected output are defined by the example.