Skip to main content

$split

The $split operator splits a string into an array of substrings based on a separator.

Input

  • An array containing exactly two string values: the input string and the separator

Output

  • An array of substrings created by splitting the input string at each occurrence of the separator

Examples

Basic Split

Result: ["apple", "banana", "orange"]

Split by Space

Result: ["Hello", "World", "Test"]

Field Value

Result: An array of tags split by commas from the tags field