How to delete an element inside of a json::any

I want to delete an element inside of a json::any but delete doesn’t work for it.
I guess it is because the json object is not mutable but I don’t know how to come around this.

Is there something I am doing wrong?
Or is there another way this is suppose to be done?

Got an example of the error you’re getting? You most likely just need to tell the compiler its a hash. E.g. something like

require "json"

data = JSON.parse %({"foo": "bar", "biz": "baz"})

data.as_h.delete "biz"

data # => {"foo" => "bar"}

Now I feel super silly, I forgot to do as_a.
Well I am very thankful for your help
Thanks