Structures
Functions
- ArrayToStruct()
Transform the array to a struct, by default, the index of the array is the key of the struct
- IsStruct()
Determines if the object is a structure
- IsValid()
Tests whether a value meets a validation or data type rule.
- Len()
Determines the length of a string, array or struct
- QueryToStruct()
Copy the query columns data to struct by using the columnKey argument
- StructAppend()
Appends all the data from struct2 into struct2, replacing duplicate keys unless specified by the overwrite flag
- StructClear()
Removes all data from a structure.
- StructCopy()
Copies a structure. Copies top-level keys, values, and arrays in the structure by value; copies nested structures by reference.
- StructCount()
Counts the keys in a structure.
- StructDelete()
Removes an element from a structure.
- StructEach()
call the given UDF/Closure with every entry (key/value) in the struct.
- StructEvery()
This function calls a given closure/function with every element in a given struct and returns true, if all of the closure calls returns true.
- StructFilter()
This function creates a new Struct that returns all entries from an struct that match the given filter.
- StructFind()
Determines the value associated with a key in a structure.
- StructFindKey()
Searches recursively through a substructure of nested arrays, structures, and other elements, for structures whose values match the search key in the value parameter.
- StructFindValue()
Searches recursively through a substructure of nested arrays, structures, and other elements for structures with values that match the search key in the value parameter.
- StructGet()
Gets a structure(s) from a specified path.
- StructInsert()
Inserts a key-value pair into a structure.
- StructIsEmpty()
Determines whether a structure contains data.
- StructKeyArray()
Returns an array of the keys from a structure
- StructKeyExists()
Determines whether a specific key is present in a structure.
- StructKeyList()
Extracts keys from a struct.
- StructKeyTranslate()
Converts any struct keys with dot notation into nested structures
- StructMap()
Calls the given closure with every element in the given struct. the function returns a struct that contains all values returned by the closure.
- StructNew()
Creates an empty structure.
- StructReduce()
Iterates over every entry of the given struct and calls the closure with every key/value. This function will reduce the struct to a single value and will return this value.
- StructSome()
This function calls a closure/function on every element in a struct until one returns true.
- StructSort()
Returns a sorted array of the top level keys in a structure. Sorts using alphabetic or numeric sorting, and can sort based on the values of any structure element.
- StructToSorted()
Returns a struct sorted by the top level keys in a structure. Sorts using alphabetic or numeric sorting.
- StructUpdate()
Updates a key with a value.
- StructValueArray()
Returns an Array with the values of the Struct
Methods
- array.toStruct()
Transform the array to a struct, by default, the index of the array is the key of the struct
- query.ToStruct()
Copy the query columns data to struct by using the columnKey argument
- struct.append()
Appends all the data from struct2 into struct2, replacing duplicate keys unless specified by the overwrite flag
- struct.clear()
Removes all data from a structure.
- struct.copy()
Copies a structure. Copies top-level keys, values, and arrays in the structure by value; copies nested structures by reference.
- struct.delete()
Removes an element from a structure.
- struct.duplicate()
Returns a new duplicated version of the given object, removing all references to the old one
- struct.each()
call the given UDF/Closure with every entry (key/value) in the struct.
- struct.every()
This function calls a given closure/function with every element in a given struct and returns true, if all of the closure calls returns true.
- struct.filter()
This function creates a new Struct that returns all entries from an struct that match the given filter.
- struct.find()
Determines the value associated with a key in a structure.
- struct.findKey()
Searches recursively through a substructure of nested arrays, structures, and other elements, for structures whose values match the search key in the value parameter.
- struct.findValue()
Searches recursively through a substructure of nested arrays, structures, and other elements for structures with values that match the search key in the value parameter.
- struct.insert()
Inserts a key-value pair into a structure.
- struct.isEmpty()
Determines whether a structure contains data.
- struct.keyArray()
Returns an array of the keys from a structure
- struct.keyExists()
Determines whether a specific key is present in a structure.
- struct.keyList()
Extracts keys from a struct.
- struct.keyTranslate()
Converts any struct keys with dot notation into nested structures
- struct.len()
Counts the keys in a structure.
- struct.map()
Calls the given closure with every element in the given struct. the function returns a struct that contains all values returned by the closure.
- struct.reduce()
Iterates over every entry of the given struct and calls the closure with every key/value. This function will reduce the struct to a single value and will return this value.
- struct.some()
This function calls a closure/function on every element in a struct until one returns true.
- struct.sort()
Returns a sorted array of the top level keys in a structure. Sorts using alphabetic or numeric sorting, and can sort based on the values of any structure element.
- struct.toSorted()
Returns a struct sorted by the top level keys in a structure. Sorts using alphabetic or numeric sorting.
- struct.update()
Updates a key with a value.
- struct.valueArray()
Returns an Array with the values of the Struct