How to add new var(matix , ...) to existing jld file and keep existing vars

How to add new “B” var(matix , …) to existing jld file and keep existing vars “A”

julia> using HDF5,JLD
julia> A=10
julia> save(“File.jld”,“A”,A)
julia> B=5
???
Paul

Try:

save("File.jld","A",A)
B=5
f=jldopen("File.jld","r+")
write(f,"B",B)
close(f)```
3 Likes