$wordCount
The$wordCount operator counts the number of words in a string.
Input
- A single string value
Output
- The number of words in the input string
Examples
Count Words in Sentence
6
Count Words in Single Word
1
Count Words in Empty String
0
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
$wordCount operator counts the number of words in a string.
{
"$wordCount": [
"Hello world this is a test"
]
}
6
{
"$wordCount": [
"Hello"
]
}
1
{
"$wordCount": [
""
]
}
0
{
"$wordCount": [
{
"$input": "text"
}
]
}
