in commands/util.go [561:585]
func getChildValues(keyValueArr whisk.KeyValueArr, key string, childKey string) []interface{} {
var value interface{}
var res []interface{}
value = keyValueArr.GetValue(key)
castedValue, canCast := value.([]interface{})
if canCast {
for i := 0; i < len(castedValue); i++ {
castedValue, canCast := castedValue[i].(map[string]interface{})
if canCast {
for subKey, subValue := range castedValue {
if subKey == childKey {
res = append(res, subValue)
}
}
}
}
}
whisk.Debug(whisk.DbgInfo, "Got values '%s' from '%v' for key '%s' and child key '%s'\n", res, keyValueArr, key,
childKey)
return res
}