I'm trying to get a timestamp ordered list of elements out of Firebase, using Golang and Firego.
The documentation suggests:
var v map[string]interface{}
if err := f.StartAt("a").EndAt("c").LimitToFirst(8).OrderBy("field").Value(&v); err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", v)
I must be missing something completely obvious, but isn't v
going to be unordered? When I loop through the map (for key, val := range v
) the values won't be in the same order as they have been sent in the response of the call to Firebase, since the order of access is undefined.
What am I missing? Thanks