code: func findMapInSliceBasedOnKeyValue(m []interface{}, key string, value interface{}) (map[string]interface{}, int, bool, error) {
  	for k, v := range m {
  		typedV, ok := v.(map[string]interface{})
  		if !ok {
  			return nil, 0, false, fmt.Errorf("value for key %v is not a map", k)
  		}
  
  		valueToMatch, ok := typedV[key]
  		if ok && valueToMatch == value {
  			return typedV, k, true, nil
  		}
  	}
  
  	return nil, 0, false, nil
  }
docs: // This method no longer panics if any element of the slice is not a map.