pub fn upsert(root: &mut Value, key: &str, value: Value)
Inserts or updates a value for a key.
Intermediate objects are created if they don’t exist.