Structs and maps, https://play.golang.org/p/u8iLBDDm2YP

https://play.golang.org/p/u8iLBDDm2YP

Why dos this code show the results only for person 2, and not person 1?

*does

As both entries have the same key ("Jones") the last inserted items overwrites the previous ones.

Interesting. I’ll try changing that.

https://play.golang.org/p/bing6SA8iCG

Success!

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.