valueArray

Returns an array of values for the given query and column.

valueArray(query, column) → returns array

Argument Reference

query query
Required

A query object

column string
Required

The column name whose values you want

Compatibility

Lucee:

Lucee also supports passing query.columnName as the first argument, however it appears to be deprecated syntax. Use queryColumnData() instead.

Examples
Sample code invoking the valueArray function

Converts the id column values into an array

news = queryNew("id", "integer", [ {id:1}, {id:2} ]);
writeOutput( serializeJSON( valueArray(news, "id") ) );

Expected Result: [1,2]


Fork me on GitHub