Hi all-
I'm trying to create an Array of Dict{ASCIIString,Any}. What I have right
now is similar to this:
Stimuli = [Dict("slots" => Dict("name"=> i,"list"=> 1)) for i = 1:10]
I want to build in the flexibility so I can add an entry later in the code:
Stimuli[1]["time"] = .234
but I get the following error because its the wrong type
MethodError: `convert` has no method matching
convert(::Type{Dict{ASCIIString,Int64}}, ::Float64)
I could add a fake entry to allow future additions:
Stimuli = [Dict("slots" => Dict("name"=> i,"list"=> 1), "fakeEntry" => 1)
for i = 1:10]
Stimuli[1]["time"] = .234
0.234
This works but it is not ideal to populate the dictionary with extraneous
entries. What is the proper way to create an Array of
Dict{ASCIIString,Any}?
Thanks,
Chris