[julia-users] Re: Possible to use filter! on a child dict within a parent dict, to remove the entire parent dict if condition in child is met?

2015-08-14 Thread Jeffrey Sarnoff
if you want to do this, yes: julia a=Dict(A=1, B=2) Dict{ASCIIString,Int64} with 2 entries: B = 2 A = 1 julia around_a=Dict(A=3, B=a) Dict{ASCIIString,Any} with 2 entries: B = Dict(B=2,A=1) A = 3 julia if (around_a[B][A] == 1) delete!(around_a[B],A); end julia

[julia-users] Re: Possible to use filter! on a child dict within a parent dict, to remove the entire parent dict if condition in child is met?

2015-08-14 Thread Ian Butterworth
Thanks. I was specifically asking about `filter!` but your code works well and it's only occupying 4 lines of code, so it should suffice. Much appreciated On Friday, 14 August 2015 12:18:29 UTC-4, Jeffrey Sarnoff wrote: if you want to do this, yes: julia a=Dict(A=1, B=2)