Esempio n. 1
0
func (filter *JSON) getValue(key string, values shared.MarshalMap) (string, bool) {
	if value, found := values.Path(key); found {
		switch value.(type) {
		case string:
			return value.(string), true

		case bool:
			return strconv.FormatBool(value.(bool)), true

		case float64:
			return strconv.FormatFloat(value.(float64), 'f', -1, 64), true
		}
	}

	return "", false
}