// Flatten a data bag item out so it's suitable for indexing. func (dbi *DataBagItem) Flatten() map[string]interface{} { flatten := make(map[string]interface{}) for key, v := range dbi.RawData { subExpand := util.DeepMerge(key, v) for k, u := range subExpand { flatten[k] = u } } return flatten }
// Flatten a data bag item out so it's suitable for indexing. func (dbi *DataBagItem) Flatten() []string { flatten := make(map[string]interface{}) for key, v := range dbi.RawData { subExpand := util.DeepMerge(key, v) for k, u := range subExpand { flatten[k] = u } } indexified := util.Indexify(flatten) return indexified }