@@ -19,8 +19,11 @@ Given the following JSON object:
19
19
"context" : {
20
20
"library" : {
21
21
"name" : " analytics.js" ,
22
- "version" : " 1.0" ,
22
+ "version" : " 1.0"
23
23
}
24
+ },
25
+ "properties" : {
26
+ "features" : [" discounts" , " dark-mode" ]
24
27
}
25
28
}
26
29
```
@@ -38,6 +41,8 @@ The following FQL statements will evaluate as follows:
38
41
| ` match( context.library.version, '2.*' ) ` | ` false ` |
39
42
| ` type = 'track' and ( event = 'Click' or match( event, 'Button *' ) ) ` | ` true ` |
40
43
| ` !contains( context.library.name, 'js' ) ` | ` false ` |
44
+ | ` 'dark-mode' in properties.features ` | ` true ` |
45
+ | ` 'blink' in properties.features ` | ` false ` |
41
46
42
47
## Field Paths
43
48
@@ -100,6 +105,7 @@ If your field name has a character not in the set of `{a-z A-Z 0-9 _ -}`, you mu
100
105
| ` >= ` | ` number ` | ` number ` | ` true ` if the left side is greater than or equal to the right side. |
101
106
| ` < ` | ` number ` | ` number ` | ` true ` if the left side is less than the right side. |
102
107
| ` <= ` | ` number ` | ` number ` | ` true ` if the left side is less than or equal to the right side. |
108
+ | ` in ` | ` string ` , ` number ` , ` bool ` , or ` null ` | ` list ` | ` true ` if the left side is contained in the list of values. |
103
109
104
110
## Subexpressions
105
111
@@ -109,6 +115,7 @@ You can use parentheses to group subexpressions for more complex "and / or" logi
109
115
| -------------------------------------------------------------------------------------------------------------- |
110
116
| ` type = 'track' and ( event = 'Click' or match( 'Button *', event ) ) ` |
111
117
| ` ( type = 'track' or type = 'identify' ) and ( properties.enabled or match( traits.email, '*@company.com' ) ) ` |
118
+ | ` !( type in ['track', 'identify'] ) ` |
112
119
113
120
## Functions
114
121
0 commit comments