To create a ArrayEx object, you can use the constructor or the global function, assign a literal value, or assign a JSON value
Response.Write ArrayEx("[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]").reverse().slice(1,5).sort("ASC").toJSON()
Dim oArray : Set oArray = ArrayEx("[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]") oArray(0) = "Value 1" Response.Write oArray.toJSON()
compact | Removes empty, Null, and duplicate entries from an array and creates a new array. |
concat | Concatenates the elements specified in the parameters with the elements in an array and creates a new array. |
filter | Executes a test function on each item in the array and constructs a new array for all items that return true for the specified function. |
forEach | Executes a function on each item in the array and returns a new array. |
forEachSetName | Sets the name of each item in the array and returns a new array. |
getItem | Gets the value of an item in the array. |
getItemCount | Gets the number of items in the array. |
getItems | Gets the core value of the object. |
joinEx | Joins the items in the array using a delimiter. |
length | Gets the length of the array. |
pop | Removes the last element from an array and returns the value of that element. |
push | Adds one or more elements to the end of an array and returns the new length of the array. |
reverse | Returns the elements of an array in reverse order as a new array. |
search | Searches the array for a value and returns a boolean. |
setItem | Sets the value of an item in the array. |
setItemEx | Sets the value of an item in the array, allows the use of a dot (. |
slice | Returns a specified number of elements from an array as a new array. |
sort | Sorts the array and returns a new array. |
sortOn | Sorts the array by an object name and returns a new array. |
sum | Adds up the values in the array. |
toAscii | Converts unicode characters to ascii characters. |
toBencode | Returns a Bencoded string representation of the object. |
toEscapeSql | Escapes special characters in the unescaped_array, so that it is safe to place it in a query. |
toHtml | Converts text to html and encodes special characters in text to html encoding. |
toHtmlDecode | Decodes special characters in the object items to html encoding. |
toHtmlEncode | Encodes special characters in the object items to html encoding. |
toJSON | Returns a json encoded string representation of the object. |
toString | Returns a string representation of the object. |
toXML | Returns an XML encoded string representation of the object. |
writeCsv | Writes a CSV file to the client. |
writeCsvToFile | Writes a CSV file. |
writeJSON | Writes a json encoded string representation of the object. |
writeXML | Writes an XML encoded string representation of the object. |
Call ArrayEx("['a', 'b', 'c', '']").compact().writeJSON()
Call ArrayEx("['a', 'b', 'c']").concat("['d', 'e', 'f']").writeJSON()
Call ArrayEx("['a', 'b', 'c']").filter("myFuncFilterB").writeJSON()
Call ArrayEx("['a', 'b', 'c']").forEach("myFuncAddPadding").writeJSON()
Call ArrayEx("['a', 'b', 'c']").joinEx("-").writeJSON()
Call ArrayEx("['a', 'b', 'c']").pop().writeJSON()
Call ArrayEx("['a', 'b', 'c']").push('d').writeJSON()
Call ArrayEx("['a', 'b', 'c']").reverse().writeJSON()
Call ArrayEx("['a', 'b', 'c']").search("a", True).writeJSON()
Call ArrayEx("['a', 'b', 'c']").slice(0,1).writeJSON()
Call ArrayEx("['a', 'b', 'c']").sort("DESC").writeJSON()
Call ArrayEx("[{'name':'a'}, {'name':'b'}, {'name':'c'}]").sortOn("name", DESC").writeJSON()
Response.Write ArrayEx("['a', 'b', 'c']").toBencode()
Response.Write ArrayEx("['a', 'b', 'c']").toJSON()
Response.Write ArrayEx("['a', 'b', 'c']").toXML()