Prism · Sugar

$match

Keeps the strings of a list that contain a given text. Shorthand for a $filter with a $contains.

The source
{
  tags: [
    'frontend',
    'backend',
    'devops',
    'frontend-react',
    'database',
  ],
}
The config
{
  $match: {
    over: { $ref: '$.tags' },
    as: 'tag',
    search: { $const: 'front' },
  },
}
What comes out
['frontend', 'frontend-react']
Output matches the expected value

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