pub(crate) fn with_map<R>( this: &Value, f: impl FnOnce(&mut Vec<(Value, Value)>) -> R, ) -> Option<R>