public Node getValue(Node container) {
        Node result = container;

        for (String part : parts) {
            if (result.asObjectNode().isPresent()) {
                result = result.expectObjectNode().getMember(part).orElse(Node.nullNode());
            } else if (result.asArrayNode().isPresent()) {
                ArrayNode array = result.expectArrayNode();
                if (part.equals("-")) {
                    return array.get(array.size() - 1).orElse(Node.nullNode());
                } else {
                    result = array.get(parseIntPart(part)).orElse(Node.nullNode());
                }
            } else {
                return Node.nullNode();
            }
        }

        return result;
    }
Gets a value from a container shape at the pointer location.

<p>When the pointer is "", then provided value is returned. When
the pointer is "/", a root object key value of "" is returned. When
an invalid property or array index is accessed, a {@link NullNode}
is returned. "-" can be used to access the last element of an array.
Any error like accessing an object key from an array or attempting
to access an invalid array index will return a {@code NullNode}.

@param container Node value container to extract a value from.
@return Returns the extracted value or a {@link NullNode} if not found.
smithy-model/src/main/java/software/amazon/smithy/model/node/NodePointer.java