How can I add a dict with 2 different field types (1D array of float and 
float) to an array nested in a dict that already exists?


The 'allmeas' structure already exists up to this point:

allmeas[measkey]["manreps"][num_manrep] 


And I'm trying to add like this:

allmeas[measkey]["manreps"][num_manrep]["autoreps"] = Array{Dict{Any,Any},1}  

num_autorep = 1
meas_1D_array = [1,2,3,4,5,6]
meas_single_value = 10

newmeas = {"meas_1D_array"=> meas_1D_array ,"meas_single_value"=> 
meas_single_value}

allmeas[measkey]["manreps"][num_manrep]["autoreps"][num_autorep] = newmeas


The error I get is on the last line:

`setindex!` has no method matching setindex!(::Type{Array{Dict{Any,Any},1}}, 
::Dict{Any,Any}, ::Int64)


If I look at the types of each side, I get:

typeof(allmeas[measkey]["manreps"][num_manrep]["autoreps"]) is 
Array{Dict{Any,Any},1}
typeof(newmeas) is Dict{Any,Any}

Reply via email to