diff --git a/object/map.go b/object/map.go index db714f7..3cdebaf 100644 --- a/object/map.go +++ b/object/map.go @@ -42,4 +42,19 @@ func ConvertStringMapToString(m *StringMap) string { fmt.Fprintf(b, "%s=\"%s\"\n", key, value) } return b.String() -} \ No newline at end of file +} + +// Get an item from an hashMap using "dot" notation. +func Get(hashedObject HashMap, key string, defaultValue interface{}) interface{} { + if key==""{ + return &hashedObject + } + + if hashedObject[key] !=nil{ + return hashedObject[key] + } + + + + return nil +}