Prism · Structure

$coalesce

The first of its values that is not null.

The source
{
  user: {
    name: null,
    displayName: null,
    email: '[email protected]',
  },
}
The config
{
  $coalesce: [
    { $ref: '$.user.name' },
    { $ref: '$.user.displayName' },
    { $ref: '$.user.email' },
    { $const: '(no name available)' },
  ],
}
What comes out
'[email protected]'
Output matches the expected value

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