Scott Steinbeck
11/28/2022, 7:45 PMTim
11/28/2022, 7:50 PMqueryObj.reduce((arrOfStruct, row) => arrOfStruct.append(row), [])
And then feed that to SerializeJSON.Adam Cameron
Adam Cameron
Scott Steinbeck
11/28/2022, 8:09 PMqryAsArray = queryExecute("select * from numbers",{},{dbtype="query", returnType="array"});
it seems they are both pretty fast, the query of query seems to be faster at scale.
https://trycf.com/gist/a69054b9dbf4ab17da28026d962db12b/lucee5?theme=monokai
I was thinking there was another way to serializeJSON…… as array or something as well but couldn’t remember exactlyScott Steinbeck
11/28/2022, 8:12 PMserializeJSON(var = numbers, queryFormat = 'struct')Scott Steinbeck
11/28/2022, 8:19 PMAdam Cameron
Scott Steinbeck
11/28/2022, 8:35 PMScott Steinbeck
11/28/2022, 8:36 PMMichael Gillespie
11/28/2022, 10:00 PMScott Steinbeck
11/28/2022, 10:03 PMMichael Gillespie
11/28/2022, 10:05 PMScott Steinbeck
11/28/2022, 10:05 PMMichael Gillespie
11/28/2022, 10:06 PMMichael Gillespie
11/28/2022, 10:07 PMScott Steinbeck
11/28/2022, 10:08 PMMichael Gillespie
11/28/2022, 10:09 PMMichael Gillespie
11/28/2022, 10:13 PMMichael Gillespie
11/28/2022, 10:14 PMScott Steinbeck
11/28/2022, 10:15 PMMichael Gillespie
11/28/2022, 10:17 PMDaniel Mejia
11/28/2022, 10:17 PMMichael Gillespie
11/28/2022, 10:19 PMDaniel Mejia
11/28/2022, 10:19 PMScott Steinbeck
11/28/2022, 10:20 PMScott Steinbeck
11/28/2022, 10:21 PMMichael Gillespie
11/28/2022, 10:21 PMDaniel Mejia
11/28/2022, 10:21 PMDaniel Mejia
11/28/2022, 10:22 PMScott Steinbeck
11/28/2022, 10:23 PMDaniel Mejia
11/28/2022, 10:24 PMScott Steinbeck
11/28/2022, 10:24 PMScott Steinbeck
11/28/2022, 10:26 PMMichael Gillespie
11/29/2022, 7:16 AM