Hi,

I have many problems to build arrays with the keys of a dictionary except 
for the simple situation :

a = [uppercase(key) for key in keys(dict)]    # works fine

If I try to select the keys with more complex criteria like :

dict = Dict("a" => 1, "b" => 2, "c" => 3, "d" => 4, "e" => 5)

a = Array{String}

for k in keys(dict)
  if dict[k] < 2
    continue
  end
    push!(a, k) # building array from keys produces errors
end


ERROR: MethodError: `push!` has no method matching push!(::Type{Array{
AbstractString,N}}, ::ASCIIString)




Thank you for your help !

Reply via email to