--- title: "Expression Attributes" slug: "expression-attributes" updated: 2025-05-07T15:26:07Z published: 2025-05-07T15:26:07Z canonical: "support.dise.com/expression-attributes" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.dise.com/llms.txt > Use this file to discover all available pages before exploring further. # Expression Attributes Expression Attributes allow the setting of state (active: true/false), based on the state of payload/data of one or more other Attributes. This can easily be added to a “[Worker Template](/dise/docs/worker-templates)“ in code, but the logic can in a lot of situations instead be done by the Player itself. For example: We have a camera-sensor measuring the number of cars in a traffic intersection: ```json {  "name": "dyn.traffic",  "data": "15" } ``` This is updated by a template, a Player Plugin or some other mechanism. To trigger on this, we can add some Expression Attributes that can be used as Conditionals in the CMS: ```json {  "name": "expr.lightTraffic",  "data": "{dyn.traffic}.VALUE < 10" } {  "name": "expr.mediumTraffic",  "data": "{dyn.traffic}.VALUE >= 10 && {dyn.traffic}.VALUE < 20" } {  "name": "expr.heavyTraffic",  "data": "{dyn.traffic}.VALUE >= 20" } ``` These will then change the active-state dynamically, based on the “dyn.traffic” data-value. The data-field frequently contains an object serialized as JSON and this is supported in the syntax. - The expression is JS-eval()’ed after massaging of the string, so any JS-operators are valid. - “{dyn.ExampleAttr}” - boolean. The active state of “dyn.exampleAttr“. - “{dyn.ExampleAttr}.VALUE“ - string. The unparsed data-value. - “{dyn.ExampleAttr}.myValue“ - The type and value of JSON.parse(attr.data).myValue. “expr.mediumTraffic“ from the example above can therefore be defined as: ```json {  "name": "expr.mediumTraffic",  "data": "!{expr.lightTraffic} && !{expr.heavyTraffic}" } ```