public Object valueFrom(Struct struct, boolean withDefault) {
        if (struct == null) return null;

        Struct current = struct;
        for (String pathSegment : stepsWithoutLast()) {
            // Check to see if the field actually exists
            if (current.schema().field(pathSegment) == null) {
                return null;
            }
            Object subValue = current.get(pathSegment);
            current = requireStructOrNull(subValue, "nested field access");
            if (current == null) return null;
        }

        String lastStep = lastStep();
        if (current.schema().field(lastStep) != null) {
            return withDefault ? current.get(lastStep) : current.getWithoutDefault(lastStep);
        } else {
            return null;
        }
    }
Access a value at the current path within a schema-based {@code Struct}
If object is not found, then {@code null} is returned.
connect/transforms/src/main/java/org/apache/kafka/connect/transforms/field/SingleFieldPath.java