Power
How to use the Power operator
The Power
operator allows you to calculate the value of a number to the power of another.
Allowed Children
Arithmetic nodes, Primitive and Reference nodes of Number type
Requirements
Must have 2 children, the first child is the number to raise to the power of the second child.
Return Type
Number
Example: Basic structure
{
"type": "Power",
"properties": {},
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_justANumberAttribute"
}
},
{
"type": "Number",
"properties": {
"value": 2
}
}
]
}
Example: Simple Power query
Find items where the result of one attribute raised to the power of another attribute value to equal to 400.
{
"type": "Query",
"properties": {
"dodiCode": "designs_exampleJobs",
"attributes": ["all"]
},
"children": [
{
"type": "Equals",
"children": [
{
"type": "Power",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_jobsConeCount"
}
},
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_jobsSafetyLightsCount"
}
}
]
},
{
"type": "Number",
"value": ["400"]
}
]
}
]
}