FromMap creates a *Map from the input map. Note that while the contents will be ordered, the ordering is not guaranteed since the input map is unordered.
(source map[string]any)
| 24 | // Note that while the contents will be ordered, the ordering is not |
| 25 | // guaranteed since the input map is unordered. |
| 26 | func FromMap(source map[string]any) *Map { |
| 27 | m := NewMap() |
| 28 | for k, v := range source { |
| 29 | m.Set(k, v) |
| 30 | } |
| 31 | return m |
| 32 | } |
| 33 | |
| 34 | // Map is a map implementation that maintains ordering of keys. |
| 35 | type Map struct { |