distinct()
Functionality¶
Returns the unique values of system array elements.
Syntax¶
How does it work?¶
The distinct()
function returns the array(system datatype) of unique elements from the current array.
if the current array value does not exist or null, it will return default null.
Example¶
coffeeshop(base class) language properties
Type | Name | Value |
---|---|---|
str | name | sample coffeeshop |
array(str) | testimonials | ['very good coffee', 'awesome ambiance', 'very good coffee'] |
source
1 2 3 4 5 6 | <div> <!-- this will retun the array with unique testimonials value --> <ul k-repeat="System.Exception: No matching Action found for the expression. at KitsuneSyntaxParser.Models.ParseTress.Parse(Node node)"> <li></li> </ul> </div> |
output
1 2 3 4 5 6 | <div> <ul> <li>very good coffee</li> <li>awesome ambiance</li> </ul> </div> |