Convert array[int] to array[str] - Flux

Say I have an array of integers:
a = [0, 1, 2, 3, 4]

How could I convert it to an array of strings?
a = ['0', '1', '2', '3', '4']

map() does not support arrays, so I am not sure how I could possibly iterate through the array changing each element using the string() function.

@tintinmovie Flux doesn’t provide a way to iterate through arrays (yet). What you’re trying to do isn’t currently possible in Flux, but the Flux team is targeting Q1 of 2021 to add this type of functionality. This isn’t the final implementation, but it will likely look something like:

import "array"

a = [0, 1, 2, 3, 4] (i) => (string(v: i))
1 Like

Ah ok.

Was able to workaround this as the array was coming from a SQL query in sql.from.

Previous query:
SELECT count FROM table1
SELECT count::text FROM table

@tintinmovie Oh cool. That works.

@scott Wanted to check if this feature is still on the agenda fro Q1? The ability to iterate over arrays that is.