[go-nuts] converting slice of items into nested array

2016-12-08 Thread Tamás Gulácsi
Use capitalized field names and struct tags - lowercase is not exported, encoding/json does not see it. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nu

[go-nuts] converting slice of items into nested array

2016-12-07 Thread aaron
I'm pretty new to golang and struggling a bit with converting flat database results into a nested JSON object. As an example... I have type item struct { raceID string racename string name string votesint32 } type race struct { raceID string racename string racers } type racers