...
Expand | |||||
---|---|---|---|---|---|
| |||||
Notice we are brought to an empty filters.lua script in the project tree. Lets add our filtering logic: First, create your a filter function Block statements and pass patient as the parameter.
Then go into main and call your filter function, passing your parsed patient JSON as the expected parameter. Notice after calling our filter function, when we go back into Navigate back to the filter.lua by using the Annotation Windows, notice there is now an annotation window block we can use to add the rest of the logic. |
Expand | |||||
---|---|---|---|---|---|
| |||||
Using String:split(), we can split the email on “@“ and get the domain name. Try this code and take a look at your annotations to see the result:
|
Expand | ||
---|---|---|
| ||
Using if statements, we can test conditions to be false and filter out data we are not interested in processing. Code Block | | |
|
...