Functions34 public, 3 private
Transforms all key-value-pairs in the provided source to its struct representation. Decoding is not done automatically. | |||
public | struct | kvpToStruct | |
required | any | source | |
struct | OPTIONS | {} | |
option | string | encoding | UTF-8 |
option | boolean | decodeKeys | false |
option | boolean | decodeValues | false |
option | boolean | trimKeys | false |
option | boolean | trimValues | false |
Compares the provided structs and returns if the first struct contains the second struct. | |||
public | boolean | structContains | |
required | struct | s1 | |
required | struct | s2 | |
Performs a deep search in the provided struct for the specified value. | |||
public | array | structContainsValue | |
required | struct | source | |
required | string | value | |
string | path | ||
Copies the key-value-pairs of the provided struct. The provided struct may have a read-only lock. | |||
public | struct | structCopyKVP | |
required | struct | target | |
Counts all keys (including nested ones) in the provided struct. | |||
public | numeric | structCountDeep | |
required | struct | target | |
public | struct | structDelete | |
required | struct | struct | |
NOTE: "equals" is reserved and cannot be used as named argument | equalTo | ||
NOTE: "contains" is reserved and cannot be used as named argument | containing | ||
string | beginsWith | ||
string | endsWith | ||
Deletes the specified key in the provided struct. The key may reach deep into the struct, but only the last key is removed from the struct. | |||
public | boolean | structDeleteDeep | |
Struct where the key is located. | |||
required | struct | target | |
Key or chain of keys to delete. | |||
required | string | key | |
Deletes all keys that match an empty counterpart. Returns the numbber of keys removed. | |||
public | numeric | structDeleteEmpty | |
required | struct | target | |
struct | OPTIONS | {} | |
option | boolean | deleteEmptyArrays | false |
option | boolean | deleteEmptyQuery | false |
option | boolean | deleteEmptyStructs | false |
option | boolean | deleteEmptyValues | true |
option | boolean | recursive | true |
Traverses the provided struct and removes all specified keys. | |||
public | any | structDeleteAny | |
required | any | struct | |
required | string, string[] | keysToDelete | |
Deletes all null values in the provided struct. If a key points directly to a null value, the key is removed. | |||
public | any | structDeleteNullValues | |
required | any | data | |
Returns a new struct that contains the differences and only the differences of the provided data objects. | |||
public | any | structDiff | |
required | any | old | |
required | any | new | |
boolean | caseSensitive | true | |
Compares keys and values of two structs and returns if they are all equal. | |||
public | boolean | structEquals | |
First struct. | |||
required | struct | struct1 | |
Second struct. | |||
required | struct | struct2 | |
Searches for missing keys and different values in the given structs. Case sensitive. | |||
public | struct | structFindDifferences | |
required | struct | first | |
required | struct | second | |
Searches for missing keys and different values in the given structs. Case insensitive. | |||
public | struct | structFindDifferencesNoCase | |
required | struct | first | |
required | struct | second | |
Searches the provided struct for the specified value. Returns the key(s) the value was found in. | |||
public | any | structFindValue | |
required | struct | source | |
required | any | value | |
struct | OPTIONS | {} | |
option | "array", "boolean", "string" | returnType | boolean |
Performs a deep search in the provided struct and returns all simple values for the specified key. | |||
public | array | structFindValueByKey | |
required | string | key | |
required | any | source | |
struct | OPTIONS | {} | |
option | boolean | returnArray | false |
option | boolean | returnStruct | false |
Flattens the given structure and returns its key with a full path. | |||
public | array | structFlatten | |
required | struct | struct | |
any | firstKey | ||
public | string | structHash | |
Struct to hash. | |||
required | struct | source | |
Algorithm to use for the hashing. | |||
string | algorithm | MD5 | |
Encoding to use for the hashing. | |||
string | encoding | UTF-8 | |
Returns if the specified key in the provided struct is null. | |||
public | boolean | structIsNullValue | |
required | struct | struct | |
required | string | key | |
Chains structKeyExists() calls similar to isDefined(). Supports mixed bracket/dot notation. | |||
public | boolean | structKeyChainExists | |
required | struct | struct | |
required | string | expression | |
Groups all keys of the provided struct using the specified delimiters. | |||
public | array | structKeysByGroup | |
required | struct | struct | |
string | delimiters | _0123456789 | |
Merges the second struct into the first struct. The second struct may override existing values. | |||
public | struct | structMerge | |
required | any | s1 | |
required | any | s2 | |
struct | OPTIONS | {} | |
option | boolean | mergeCase | true |
option | boolean | nullToEmptyString | false |
' | |||
public | struct | structParseChain | |
required | string | chain | |
string | delimiters | ||
Searches in the provided struct using the specified regular expression and returns the key of the first occurrence. | |||
public | string | structREfind | |
required | string | expression | |
required | struct | source | |
Searches in the provided struct using the specified regular expression and returns the key of the first occurrence. | |||
public | string | structREfindNoCase | |
required | string | expression | |
required | struct | source | |
Filters the provided struct using the specified regular expression. | |||
public | struct | structREfilter | |
required | string | expression | |
required | struct | source | |
Filters the provided struct using the specified regular expression. | |||
public | struct | structREfilterNoCase | |
required | string | expression | |
required | struct | source | |
Shuffles the order of the top level keys in the provided struct. Returns an array of the shuffled top level keys. | |||
public | array | structShuffle | |
required | struct | source | |
Sorts the keys of the provided struct according to the specified order and returns the sorted keys in an array. | |||
public | array | structSortKeys | |
required | struct | source | |
required | string | sortType | |
string | sortOrder | ASC | |
Sorts the provided struct by their keys and moves them to a LinkedHashMap. | |||
public | struct | structSortToLinked | |
required | struct | source | |
struct | OPTIONS | {} | |
option | "ASC", "DESC" | orderBy | ASC |
Returns an array that contains the sorted key order based on their value count. | |||
public | array | structSortByKeyLength | |
required | struct | structure | |
string | sortOrderCount | ASC | |
string | sortOrderKey | ASC | |
numeric | padding | 1 | |
Trims all simple values in the provided struct. Complex values are ignored. | |||
public | struct | structTrimValues | |
Struct with the values to trim. | |||
required | struct | struct | |
How to trim the values. SIMPLE: Remove leading and trailing whitespaces. EXTENDED: Remove leading, trailing and consecutive whitespaces. | |||
string | level | SIMPLE | |
public | array | structValueArray | |
required | struct | struct | |
public | string | structValueList | |
required | struct | struct | |
string | delimiter | , |