func Time(position string, mapper map[string]interface{}, layout string) (time.Time, bool) {
	return New(mapper).Time(position, layout)
}
Time is helper for function Time from Map.
package nested
import (
	"encoding/json"
	"errors"
	"strings"
	"time"
)
var ErrInvalidInputType = errors.New("this is not a valid input")
type Map map[string]interface{}
func New(in map[string]interface{}) Map {
	if in == nil {
		in = make(map[string]interface{})
	}
	return Map(in)
}
func NewFromJSON(in string) (Map, error) {
	var m Map
	if err := json.Unmarshal([]byte(in), &m); err != nil {
		return nil, ErrInvalidInputType
	}
	return m, nil
}
func NewFromInterface(in interface{}) (Map, error) {
	if m, ok := in.(map[string]interface{}); ok {
		return New(m), nil
	}
	return nil, ErrInvalidInputType
}
func (m Map) GetInterface(position string) interface{} {
	value, _ := m.Interface(position)
	return value
}
func (m Map) Interface(position string) (interface{}, bool) {
	pos := strings.Split(position, ".")
	t := m
	for key, posKey := range pos {
		v, ok := t[posKey]
		if !ok {
			break
		}
		if newValue, ok := v.(map[string]interface{}); ok {
			if key+1 == len(pos) {
				return v, true
			}
			t = newValue
		} else if newString, ok := v.(string); ok {
			return newString, true
		} else if newInt, ok := v.(int); ok {
			return newInt, true
		}
	}
	return nil, false
}
func (m Map) GetString(position string) string {
	value, _ := m.String(position)
	return value
}
func (m Map) String(position string) (value string, ok bool) {
	var valueTmp interface{}
	if valueTmp, ok = m.Interface(position); !ok {
		return "", false
	}
	if value, ok = valueTmp.(string); !ok {
		return "", false
	}
	return value, true
}
func (m Map) GetInt(position string) int {
	value, _ := m.Int(position)
	return value
}
func (m Map) Int(position string) (value int, ok bool) {
	var valueTmp interface{}
	if valueTmp, ok = m.Interface(position); !ok {
		return 0, false
	}
	if value, ok = valueTmp.(int); !ok {
		return 0, false
	}
	return value, true
}
func (m Map) GetTime(position, layout string) time.Time {
	value, _ := m.Time(position, layout)
	return value
}
func (m Map) Time(position, layout string) (value time.Time, ok bool) {
	var valueTmp string
	if valueTmp, ok = m.String(position); !ok {
		return time.Time{}, false
	}
	if layout == "" {
		layout = time.RFC3339
	}
	var err error
	if value, err = time.Parse(layout, valueTmp); err != nil {
		return time.Time{}, false
	}
	return value, true
}
func (m Map) SubFromString(position string) (Map, bool) {
	subData, ok := m.String(position)
	if !ok {
		return nil, false
	}
	var value Map
	if err := json.Unmarshal([]byte(subData), &value); err != nil {
		return nil, false
	}
	return value, true
}
func (m Map) GetSubFromString(position string) Map {
	value, _ := m.SubFromString(position)
	return value
}
func Interface(position string, mapper map[string]interface{}) (interface{}, bool) {
	return New(mapper).Interface(position)
}
func GetInterface(position string, mapper map[string]interface{}) interface{} {
	return New(mapper).GetInterface(position)
}
func String(position string, mapper map[string]interface{}) (string, bool) {
	return New(mapper).String(position)
}
func GetString(position string, mapper map[string]interface{}) string {
	return New(mapper).GetString(position)
}
func Int(position string, mapper map[string]interface{}) (int, bool) {
	return New(mapper).Int(position)
}
func GetInt(position string, mapper map[string]interface{}) int {
	return New(mapper).GetInt(position)
}