How to link a Selector to a column of a DataTable

Hi,

I have some JSON of the form

 j = JSON.parse("""[{"A":"one", "B":2},{"A":"three","B":4}]""")

I have made a DataTable by

 dt = DataTable(DataFrame(j))

Next I would like to bind a Selector control to a column. I can get a column but it is of type DataTable{Vector{String}} but the control needs type Vector{String}; it needs Vector{Any} and String will work. However, I cannot get the column as Vector{String} out of the DataTable.

For example, with

 selector_col = dt[!,"A"] 

selector_col is of type DataTable{Vector{String}} and I can’t extract type Vector{String}.

 Vector{String}(dt[!,"A"])

gives an error

 MethodError(Vector{String}, (DataTable{Vector{String}}([ ... the column list I want ... ], ...]

Which I think means there is no cast defined from DataTable{Vector{String}} to Vector{String}.

How is this done or am I going about it the wrong way?

Thanks

DataTables.jl is deprecated.
Could use the DataFrame directly or is there something from DataTables.jl that you really need?

The project is in Genie Builder which needs DataTable for its tabluar data visualization controls. I could hold 2 copies of the data in memory (DataTable and DataFrame) but I’d prefer not to for all the standard reasons. Would the column pull be the same for DataFrame but return Vector{String} type?

Yes, df[!, :A] produces a view of the data vector.
Unfortunately, I don’t anything about Genie Builder. It should be possible to get the elements of the DataTable out one by one and assemble them into a Vector (unless you need a view). But I don’t know how to do that, and the code given in the DataTables docs does not run (not a good sign!).

Thanks for having a look. I’ve reach out to the Genie Builder support team. Will see what they have to say.