You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/2024.9/Reference/Concepts/fundamentals/blocks/block-properties/property-editors/expression-editor.md
Decomposition expressions are used to extract the properties of an [Output property][Output properties]and store them in[variables][Variables Concept].
564
+
Decomposition expressions are used to save selected values from an [Output property][Output properties]to multiple[variables][Variables Concept].
565
565
566
566
{{% alert title="Note" %}}
567
567
This is currently only supported by output properties.
568
568
{{% /alert %}}
569
569
570
-
[Output properties][] can be decomposed using the decomposition syntax which includes the following syntaxes:
571
-
572
-
-[Property expression][Property expressions]
573
-
-[Index expression][Index expressions]
574
-
575
-
The decomposition syntax follows a very similar pattern to a `JSON` object:
570
+
Decomposition syntax follows a similar pattern to a `JSON` object:
576
571
577
572
- each `key` is the property path expression, where `$` is the root of the output value.
578
573
- each `value` is the variable name, prefixed with `($)`.
@@ -584,13 +579,13 @@ The decomposition syntax follows a very similar pattern to a `JSON` object:
584
579
}
585
580
```
586
581
587
-
The examples below assumes that the output value contains the following JSON object:
582
+
The examples below assumes that the output value contains the following data:
588
583
589
584
```json
590
585
{
591
586
"company": {
592
587
"name": "Company Name",
593
-
"department": [
588
+
"departments": [
594
589
{
595
590
"name": "HR",
596
591
"employees": [
@@ -622,17 +617,17 @@ The examples below assumes that the output value contains the following JSON obj
622
617
}
623
618
```
624
619
625
-
### Decomposing an object property
620
+
####Decomposing an object property
626
621
627
-
To decompose this structure and store the departments, the syntax would be:
622
+
To save the `departments` property, the syntax would be:
628
623
629
624
```json
630
625
{
631
-
"$.company.department": ($)ListOfDepartment
626
+
"$.company.departments": ($)ListOfDepartments
632
627
}
633
628
```
634
629
635
-
In this example, the variable `($)ListOfDepartment` will be set to the following value:
630
+
In this example, the variable `($)ListOfDepartments` will be set to the following value:
636
631
637
632
```json
638
633
[
@@ -665,13 +660,13 @@ In this example, the variable `($)ListOfDepartment` will be set to the following
665
660
]
666
661
```
667
662
668
-
### Decomposing a list item
663
+
####Decomposing an item in a list
669
664
670
-
To decompose this structure and store the first `department`, the syntax would be:
665
+
To save the first department, the syntax would be:
671
666
672
667
```json
673
668
{
674
-
"$.company.department[0]": ($)FirstDepartment
669
+
"$.company.departments[0]": ($)FirstDepartment
675
670
}
676
671
```
677
672
@@ -693,13 +688,13 @@ In this example, the variable `($)FirstDepartment` will be set to the following
693
688
}
694
689
```
695
690
696
-
### Decomposing the last list item
691
+
####Decomposing the last item in a list
697
692
698
-
To decompose this structure and store the last `employee` of the first `department`, the syntax would be:
693
+
To save the last `employee` of the first department, the syntax would be:
0 commit comments