func (r *Record) GetFieldValueByType(fieldType string) string {
	if fieldType == "" {
		return ""
	}

	values := []string{}
	if fields := r.GetFieldsByType(fieldType); len(fields) > 0 {
		if iValues, ok := fields[0]["value"].([]interface{}); ok {
			for i := range iValues {
				val := iValues[i]
				// JavaScript has no integers but only one number type, IEEE754 double precision float
				if fval, ok := val.(float64); ok && fval == float64(int(fval)) {
					val = int(fval) // convert to int
				}
				values = append(values, fmt.Sprintf("%v", val))
			}
		}
	}

	return strings.Join(values, ", ")
}
// GetFieldValueByType returns string value of the *first* field from fields[] that matches fieldType
GetFieldValueByType returns string value of the *first* field from fields[] that matches fieldType
// GetFieldValueByType returns string value of the * first * field from fields [] that matches fieldType
func (r *Record) GetFieldValueByType(fieldType string) string {
	if fieldType == "" {
		return ""
	}
	values := []string{}
	if fields := r.GetFieldsByType(fieldType); len(fields) > 0 {
		if iValues, ok := fields[0]["value"].([]interface{}); ok {
			for i := range iValues {
				val := iValues[i]
				if fval, ok := val.(float64); ok && fval == float64(int(fval)) {
					val = int(fval) 
				}
				values = append(values, fmt.Sprintf("%v", val))
			}
		}
	}
	return strings.Join(values, ", ")
}
func ( r * Record ) GetFieldValueByType ( fieldType string ) string { if fieldType == " " { return " " } values := [ ] string { } if fields := r . GetFieldsByType ( fieldType ) ; len ( fields ) > 0 { if iValues , ok := fields [ 0 ] [ " " ] . ( [ ] interface { } ) ; ok { for i := range iValues { val := iValues [ i ] if fval , ok := val . ( float64 ) ; ok && fval == float64 ( int ( fval ) ) { val = int ( fval ) } values = append ( values , fmt . Sprintf ( " " , val ) ) } } } return strings . Join ( values , " " ) }
GetFieldValueByType returns string value of the *first* field from fields[] that matches fieldType
GetFieldValueByType returns string value of the * first * field from fields [] that matches fieldType
// JavaScript has no integers but only one number type, IEEE754 double precision float // convert to int