ChrisSamo632 commented on code in PR #6778:
URL: https://github.com/apache/nifi/pull/6778#discussion_r1058952730


##########
nifi-docs/src/main/asciidoc/record-path-guide.adoc:
##########
@@ -1071,6 +1071,37 @@ take the value of the supplied record path and use it as 
the namespace.
 Please note that the namespace must always be a valid UUID string. An empty 
string, another data type, etc. will result
 in an error. This is by design because the most common use case for UUID v5 is 
to uniquely identify records across data sets.
 
+
+=== count
+
+Returns the count of the number of elements. This is commonly used in 
conjunction with arrays. For example, if we have the following record:
+
+----
+{
+    "id": "1234",
+    "elements": [{
+        "name": "book",
+        "color": "red"
+    }, {
+        "name": "computer",
+        "color": "black"
+    }]
+}
+----
+
+We could determine the number of `elements` by using the `count` function. 
Using:
+
+----
+count(/elements[*])
+----
+
+Would yield a value of `2`. We could also use this as a filter, such as:
+----
+/id[ count(/elements[*]) ]

Review Comment:
   This would reflect the unit test you've written with a `> 2` example



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to