Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotFound = errors.New("Key not found")

Functions

func FlattenList

func FlattenList(l []interface{}, parent, delimiter string) map[string]interface{}

    FlattenList takes a `[]interface{}` and flatten/explode each items a map key. e.g.: ["s1", "s2"] => {"0": "s1", "1": "s2"}

    func FlattenMap

    func FlattenMap(m map[string]interface{}, parent, delimiter string) map[string]interface{}

      FlattenMap takes a `map[string]interface{}` and flatten/explode it e.g.: {"k1": {"k2": 1}} => {"k1.k2": 1}

      func GetPath

      func GetPath(doc map[string]interface{}, path string) (interface{}, error)

        GetPath returns the map value for the given "dot notation" path, or returns `ErrKeyNotFound`

        Types

        This section is empty.

        Source Files