Closed seanrmurphy closed 3 years ago
@seanrmurphy sorry for the late response, right now you can't obtain a map, you can however obtain a KeyValuePair
list which you could convert into a map
source := map[string]string{
// . . . Some data here in the map
}
target := map[string]string{}
streams.From(b). {some operations here} .ForEach(func (i interface{} {
x := i.(streams.KeyValuePair)
target[x.Key.(string)] = x.Value(string)
})
Is seems straightforward to obain an array as an output of stream operations (using
ToArray()
). Is it also possible to obtain a map?