Operators currently supported by this component
= equality operator
>= greater than or equal to
<= less than or equal to
<> NOT equal to
like This is used for string comparison and behavior is similar to 'contains'
For using this component
For example
Given the following Data as JSON
{
"title": "The Lord of the Rings: The Fellowship of the Ring",
"ReleaseDate": "2001-12-19T00:00:00",
"director": { "firstName": "Peter", "lastName": "Jackson" },
"SCORE": 8.8,
"actors": [
{ "name": "Elijah Wood", "plays": "Frodo Baggins"},
{ "name": "Sean Astin", "plays": "Samwise 'Sam' Gamgee"},
{ "name": "Sean Bean", "plays": "Boromir"},
{ "name": "Cate Blanchett", "plays": "Galadriel"},
{ "name": "Ian Holm", "plays": "Bilbo Baggins"}
],
"keywords": [ "ring", "hobbit", "doom", "middle earth", "quest", "epic" , "bravery"]
}
Checks that can be performed using this component are
1. String contains check - title like Lord, actors[0].name like Wood, keywords[1] = hobbit
2. Number value check - SCORE >= 8.8,
3. Date Check - ReleaseDate < 2001-12-21
4. You can also check the attributes inside of an array by providing the JSON path to the attribute and specifying the condition to evaluate
5. In additional, you can specify if all array elements should satisfy the given rule condition by setting the Exit on True flag to FALSE/ OFF. On the other hand, turning this flag to TRUE/ ON, the array check exits the array iterator on the first positive match for the given rule condition
6. You can also perform aggregate checks for min, max, count, sum and average functions on a given (number type) array attribute. However, the aggregate functions are only available for evaluation on the server side only. For usage, check the demo page
Note: Rule persistence feature is implemented on the server side demo page i.e. if you need to create a rule repository and perform "Check All" then you need to create the rules using the server side demo page. Once defined on the server side, these rules are also made available for client side execution