// ToMap converts operation variables into a JSON object for easier use in templates
ToMap converts operation variables into a JSON object for easier use in templates
// ToMap converts operation variables into a JSON object for easier use in templates
func (v OperationVariables) ToMap() (map[string]interface{}, error) {
	bytes, err := json.Marshal(v)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	var object map[string]interface{}
	err = json.Unmarshal(bytes, &object)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return object, nil
}
func ( v OperationVariables ) ToMap ( ) ( map [ string ] interface { } , error ) { bytes , err := json . Marshal ( v ) if err != nil { return nil , trace . Wrap ( err ) } var object map [ string ] interface { } err = json . Unmarshal ( bytes , & object ) if err != nil { return nil , trace . Wrap ( err ) } return object , nil }
ToMap converts operation variables into a JSON object for easier use in templates
ToMap converts operation variables into a JSON object for easier use in templates