func UpdateOutput(instanceOutput *sqlv1alpha1.PostgreSql, output string) (error, *sqlv1alpha1.PostgreSql) {
	out := extractOutput(output)
	jsonit := jsoniter.Config{
		EscapeHTML:             true,
		SortMapKeys:            true,
		ValidateJsonRawMessage: true,
		TagKey:                 "json",
	}.Froze()

	var d map[string]interface{}
	finalMap := make(map[string]interface{})

	err := jsonit.Unmarshal(out, &d)
	if err != nil {
		return err, nil
	}
	for e, v := range d {
		m := v.(map[string]interface{})
		for i, k := range m {
			if i == "value" {
				finalMap[e] = k
			}
		}
	}

	err = mapstructure.Decode(finalMap, &instanceOutput.Status.Output)
	if err != nil {
		return err, nil
	}
	return nil, instanceOutput
}
//UpdateOutput Unmarshal the returned output and update the output status
UpdateOutput Unmarshal the returned output and update the output status
// UpdateOutput Unmarshal the returned output and update the output status
func UpdateOutput(instanceOutput *sqlv1alpha1.PostgreSql, output string) (error, *sqlv1alpha1.PostgreSql) {
	out := extractOutput(output)
	jsonit := jsoniter.Config{
		EscapeHTML:             true,
		SortMapKeys:            true,
		ValidateJsonRawMessage: true,
		TagKey:                 "json",
	}.Froze()
	var d map[string]interface{}
	finalMap := make(map[string]interface{})
	err := jsonit.Unmarshal(out, &d)
	if err != nil {
		return err, nil
	}
	for e, v := range d {
		m := v.(map[string]interface{})
		for i, k := range m {
			if i == "value" {
				finalMap[e] = k
			}
		}
	}
	err = mapstructure.Decode(finalMap, &instanceOutput.Status.Output)
	if err != nil {
		return err, nil
	}
	return nil, instanceOutput
}
func UpdateOutput ( instanceOutput * sqlv1alpha1 . PostgreSql , output string ) ( error , * sqlv1alpha1 . PostgreSql ) { out := extractOutput ( output ) jsonit := jsoniter . Config { EscapeHTML : true , SortMapKeys : true , ValidateJsonRawMessage : true , TagKey : " " , } . Froze ( ) var d map [ string ] interface { } finalMap := make ( map [ string ] interface { } ) err := jsonit . Unmarshal ( out , & d ) if err != nil { return err , nil } for e , v := range d { m := v . ( map [ string ] interface { } ) for i , k := range m { if i == " " { finalMap [ e ] = k } } } err = mapstructure . Decode ( finalMap , & instanceOutput . Status . Output ) if err != nil { return err , nil } return nil , instanceOutput }
UpdateOutput Unmarshal the returned output and update the output status
UpdateOutput Unmarshal the returned output and update the output status