method

Value.Get

Read an immutable object child without copying its container.

Example

go
seo := store.Object(store.Values{"title": store.String("Home")})
title, ok := seo.Get("title").StringValue()

Arguments

ArgumentTypeDescription
namestringA literal direct-child name; dots do not traverse nested objects.

Returns

The child value, or Null for a missing key or a non-object.

Value

How it works

Use Lookup when missing and explicit null must be distinguished.

Full signature

func (value Value) Get(name string) Value

Source store/value.go:128

Related types

  • Value

    An immutable scalar, object, list, or populated document value.

Related guides