Skip to main content

Multiply

How to use the Multiply operator

The Multiply operator allows you to multiply two number values, e.g. 10 x 2.

Allowed Children

Arithmetic nodes, Primitive and Reference nodes of Number type

Requirements

Must have 2 children

Return Type

Number

Example: Basic structure
{
"type": "Multiply",
"properties": {},
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_justANumberAttribute"
}
},
{
"type": "Number",
"properties": {
"value": 2
}
}
]
}
Example: Simple Multiply query

Find items where the result of the multiplication of two specified attribute values is equal to 20.

{
"type": "Query",
"properties": {
"dodiCode": "designs_exampleJobs",
"attributes": ["all"]
},
"children": [
{
"type": "Equals",
"children": [
{
"type": "Multiply",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_jobsConeCount"
}
},
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_jobsSafetyLightsCount"
}
}
]
},
{
"type": "Number",
"value": ["20"]
}
]
}
]
}