Skip to content

Array Operations

List manipulation — chunk, flatten, group, map, reduce, zip, and more.

12 modules

ModuleDescription
Dizi ParçalaDiziyi belirtilen boyutta parçalara böl
CompactRemove null/empty values from array
Dizi FarkıDiğerlerinde olmayan ilk dizideki öğeleri bul
DropDrop first N elements from array
Dizi Düzleştirİç içe dizileri tek diziye düzleştir
Group ByGroup array elements by a key
Dizi KesişimiDiziler arasındaki ortak öğeleri bul
Dizi BirleştirDizi öğelerini dizeye birleştir
Dizi EşleDizideki her öğeyi dönüştür
Dizi İndirgeDiziyi tek değere indirge
TakeTake first N elements from array
Zip ArraysCombine multiple arrays element-wise

Modules

Dizi Parçala

array.chunk

Diziyi belirtilen boyutta parçalara böl

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Array of items to process. Can be numbers, strings, or objects.
sizenumberYes10Number of items per chunk

Output:

FieldTypeDescription
resultarrayParça dizisi
chunksnumberParça dizisi

Example: Chunk into groups of 3

yaml
array: [1, 2, 3, 4, 5, 6, 7, 8, 9]
size: 3

Example: Batch process items

yaml
array: ["a", "b", "c", "d", "e"]
size: 2

Compact

array.compact

Remove null/empty values from array

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Array to compact
remove_empty_stringsbooleanNoTrueRemove empty strings
remove_zerobooleanNoFalseRemove empty strings
remove_falsebooleanNoFalseRemove zero values

Output:

FieldTypeDescription
resultarrayRemove false values
removednumberCompacted array

Dizi Farkı

array.difference

Diğerlerinde olmayan ilk dizideki öğeleri bul

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Array of items to process. Can be numbers, strings, or objects.
subtractarrayYes-Arrays containing items to remove from the base array

Output:

FieldTypeDescription
resultarrayİlk diziye özgü öğeler
lengthnumberİlk diziye özgü öğeler

Example: Find unique elements

yaml
array: [1, 2, 3, 4, 5]
subtract: [[2, 4], [5]]

Drop

array.drop

Drop first N elements from array

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Source array
countnumberYes1Source array

Output:

FieldTypeDescription
resultarrayNumber of elements to drop
droppednumberRemaining elements

Dizi Düzleştir

array.flatten

İç içe dizileri tek diziye düzleştir

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Array of items to process. Can be numbers, strings, or objects.
depthnumberNo1How many levels of nesting to flatten (-1 for infinite)

Output:

FieldTypeDescription
resultarrayDüzleştirilmiş dizi
lengthnumberDüzleştirilmiş dizi

Example: Flatten one level

yaml
array: [[1, 2], [3, 4], [5, 6]]
depth: 1

Example: Flatten all levels

yaml
array: [[1, [2, [3, [4]]]]]
depth: -1

Group By

array.group_by

Group array elements by a key

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Array of objects to group
keystringYes-Array of objects to group

Output:

FieldTypeDescription
groupsobjectProperty name to group by
keysarrayGrouped results
countnumberGrouped results

Dizi Kesişimi

array.intersection

Diziler arasındaki ortak öğeleri bul

Parameters:

NameTypeRequiredDefaultDescription
arraysarrayYes-Array of arrays to process (for intersection, union)

Output:

FieldTypeDescription
resultarrayOrtak öğeler
lengthnumberOrtak öğeler

Example: Find common elements

yaml
arrays: [[1, 2, 3, 4], [2, 3, 5], [2, 3, 6]]

Dizi Birleştir

array.join

Dizi öğelerini dizeye birleştir

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Array of items to process. Can be numbers, strings, or objects.
separatorselect (, , ,, , `
, , - `, ``)No,String to insert between items when joining

Output:

FieldTypeDescription
resultstringBirleştirilmiş dize

Example: Join with comma

yaml
array: ["apple", "banana", "cherry"]
separator: ,

Example: Join with newline

yaml
array: ["Line 1", "Line 2", "Line 3"]
separator:

Dizi Eşle

array.map

Dizideki her öğeyi dönüştür

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Array of items to process. Can be numbers, strings, or objects.
operationselect (multiply, add, subtract, divide, extract, uppercase, lowercase, trim, tostring, tonumber)Yes-Transformation to apply to each item
valueanyNo-Value for the operation: number for math operations, field name for extract

Output:

FieldTypeDescription
resultarrayDönüştürülmüş dizi
lengthnumberDönüştürülmüş dizi

Example: Multiply numbers

yaml
array: [1, 2, 3, 4, 5]
operation: multiply
value: 2

Example: Extract field from objects

yaml
array: [{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]
operation: extract
value: name

Dizi İndirge

array.reduce

Diziyi tek değere indirge

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Array of items to process. Can be numbers, strings, or objects.
operationselect (sum, product, average, min, max, count, join, first, last)Yes-How to combine all items into a single value
separatorselect (, , ,, , `
, , - `, ``)No,String to insert between items when joining

Output:

FieldTypeDescription
resultanyİndirgenmiş değer
operationstringİndirgenmiş değer

Example: Sum numbers

yaml
array: [1, 2, 3, 4, 5]
operation: sum

Example: Join strings

yaml
array: ["Hello", "World", "from", "Flyto"]
operation: join
separator:

Take

array.take

Take first N elements from array

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Source array
countnumberYes1Source array

Output:

FieldTypeDescription
resultarrayNumber of elements to take
lengthnumberTaken elements

Zip Arrays

array.zip

Combine multiple arrays element-wise

Parameters:

NameTypeRequiredDefaultDescription
arraysarrayYes-Array of arrays to zip
fill_valueanyNo-Array of arrays to zip

Output:

FieldTypeDescription
resultarrayValue for missing elements
lengthnumberZipped array

Released under the Apache 2.0 License.