# EXAMPLE - Nested Functions

This simple example illustrates how the following functions operate on nested data.

• `ARRAYCONCAT` - Concatenate multiple arrays together. See ARRAYCONCAT Function.
• `ARRAYINTERSECT` - Find the intersection of elements between multiple arrays. See ARRAYINTERSECT Function.
• `ARRAYCROSS` - Compute the cross product of multiple arrays. See ARRAYCROSS Function.
• `ARRAYUNIQUE` - Generate unique values across multiple arrays. See ARRAYUNIQUE Function.

Source:

Code formatting has been applied to improve legibility.

ItemArrayAArrayB
Item1`["A","B","C"]``["1","2","3"]`
Item2`["A","B"]``["A","B","C"]`
Item3`["D","E","F"]``["4","5","6"]`

Transformation:

You can apply the following transforms in the following order. Note that the column names must be different from the transform name, which is a reserved word.

Transformation Name `New formula` `Single row formula` `ARRAYCONCAT([Letters,Numerals])` `'concat2'`

Transformation Name `New formula` `Single row formula` `ARRAYINTERSECT([Letters,Numerals])` `'intersection2'`

Transformation Name `New formula` `Single row formula` `ARRAYCROSS([Letters,Numerals])` `'cross2'`

Transformation Name `New formula` `Single row formula` `ARRAYUNIQUE([Letters,Numerals])` `'unique2'`

Results:

For display purposes, the results table has been broken down into three separate sets of columns.

Column set 1:

ItemArrayAArrayBconcat2intersection2
Item1

`["A","B","C"]`

`["1","2","3"]``["A","B","C","1","2","3"]``[ ]`
Item2`["A","B"]``["A","B","C"]``["A","B","A","B","C"]``["A","B"]`
Item3`["D","E","F"]``["4","5","6"]``["D","E","F","4","5","6"]``[ ]`

Column set 2:

Itemcross2
Item1`[["A","1"],["A","2"],["A","3"],["B","1"],["B","2"],["B","3"],["C","1"],["C","2"],["C","3"]]`
Item2`[["A","A"],["A","B"],["A","C"],["B","A"],["B","B"],["B","C"]]`
Item3```[["D","4"],["D","5"],["D","6"],["E","4"],["E","5"],["E","6"], ["F","4"],["F","5"],["F","6"]]```

Column set 3:

Itemunique2
Item1`["A","B","C","1","2","3"]`
Item2`["A","B","C"]`
Item3```["D","E","F","4","5","6"] ```
[{ "type": "thumb-down", "id": "hardToUnderstand", "label":"Hard to understand" },{ "type": "thumb-down", "id": "incorrectInformationOrSampleCode", "label":"Incorrect information or sample code" },{ "type": "thumb-down", "id": "missingTheInformationSamplesINeed", "label":"Missing the information/samples I need" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]