Structs

Struct functions and struct member functions.

Struct functions and struct member functions. 33 entries. This page is generated from the MatchBox source; see the function reference index for how to read the tables and what each gate means.

FunctionFormsGateNotes
queryStringToStructqueryStringToStruct( ... )alwaysParses a URL query string into a struct.
structAppendstructAppend( target, source, overwrite = true ), struct.append( source, overwrite = true )alwaysCopies the keys of the second struct into the first, in place. Member form needs the prelude function kept; see "Prelude functions called as members" on the index page.
structClearstructClear( ... )alwaysRemoves all keys.
structCopystructCopy( struct )alwaysReturns a shallow copy.
structCountstructCount( ... )alwaysReturns the number of keys.
structDeletestructDelete( ... )alwaysRemoves a key.
structEachstructEach( struct, callback ), struct.each( callback )alwaysMember form needs the prelude function kept; see "Prelude functions called as members" on the index page.
structEqualsstructEquals( ... ), struct.equals( ... )alwaysCompares two structs by content.
structEverystructEvery( struct, callback )alwaysReturns true when the callback is true for every entry.
structFilterstructFilter( struct, predicate )alwaysReturns the entries for which the callback returns true.
structFindstructFind( ... ), struct.find( ... )alwaysReturns the value of a key.
structFindKeystructFindKey( ... ), struct.findKey( ... )always
structFindValuestructFindValue( struct, value, scope = "one" )always
structGetstructGet( ... )alwaysReturns the value of a key.
structGetMetadatastructGetMetadata( ... ), struct.getMetadata( ... )always
structInsertstructInsert( ... )alwaysAdds a key; returns true.
structIsCaseSensitivestructIsCaseSensitive( ... ), struct.isCaseSensitive( ... )always
structIsEmptystructIsEmpty( ... ), struct.isEmpty( ... )alwaysReturns true when the struct has no keys.
structIsOrderedstructIsOrdered( ... ), struct.isOrdered( ... )alwaysReturns true for a struct created with structNew( "ordered" ).
structKeyArraystructKeyArray( ... )alwaysReturns the keys as an array.
structKeyExistsstructKeyExists( ... ), struct.exists( ... ), struct.keyExists( ... )alwaysReturns true when the key exists.
structKeyListstructKeyList( struct, delimiter = "," )alwaysReturns the keys as a delimited list, comma by default.
structKeyTranslatestructKeyTranslate( ... ), struct.keyTranslate( ... )always
structMapstructMap( struct, callback )alwaysReturns a struct of the callback results: callback( key, value ).
structNewstructNew( ... )always
structNonestructNone( struct, callback )alwaysReturns true when the callback is true for no entry.
structReducestructReduce( struct, callback, initialValue )alwaysFolds the entries into one value: callback( accumulator, key, value ), initial value.
structSomestructSome( struct, callback )alwaysReturns true when the callback is true for at least one entry.
structSortstructSort( struct, sortType = "text", sortOrder = "asc", path = "", callback = null )always
structToQueryStringstructToQueryString( ... ), struct.toQueryString( ... )alwaysBuilds a URL query string from the entries.
structToSortedstructToSorted( ... ), struct.toSorted( ... )always
structUpdatestructUpdate( ... )alwaysSets the value of a key.
structValueArraystructValueArray( struct )alwaysReturns the values as an array.
Edit this page Download Markdown Last updated Oct 27, 2026, 1:45:34 PM Report an issue