Prism · Logic

$or

Gives its first truthy operand, or the last one when none is, and evaluates no further than that.

The source
{ user: { nickname: null, name: 'Ada' } }
The config
{
  $or: [{ $ref: '$.user.nickname' }, { $ref: '$.user.name' }],
}
What comes out
'Ada'
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.