@Override
    public String getField(int rowNum, String fieldName) {
        try {
            if (isContextField(fieldName)) {
                return getContextField(fieldName);
            }
            // split field name
            List<JsonNode> childNodes = new ArrayList<>();
            String[] nodeStrings = fieldName.split("\\.");
            for (String nodeString : nodeStrings) {
                childNodes.add(new JsonNode(nodeString));
            }
            // parse
            if (childNodes.size() == 0) {
                return "";
            }
            // first node
            JsonNode firstNode = childNodes.get(0);
            JsonElement current = root;
            if (StringUtils.equals(ROOT_KEY, firstNode.getName())) {
                current = root;
            } else if (StringUtils.equals(CHILD_KEY, firstNode.getName())) {
                if (rowNum < childRoot.size()) {
                    current = childRoot.get(rowNum);
                } else {
                    return "";
                }
            } else {
                // error data
                return "";
            }
            if (current == null) {
                // error data
                return "";
            }
            // parse other node
            for (int i = 1; i < childNodes.size(); i++) {
                JsonNode node = childNodes.get(i);
                if (!current.isJsonObject()) {
                    // error data
                    return "";
                }
                JsonElement newElement = current.getAsJsonObject().get(node.getName());
                if (newElement == null) {
                    // error data
                    return "";
                }
                // node is not array
                if (!node.isArray()) {
                    current = newElement;
                    continue;
                }
                // node is an array
                current = getElementFromArray(node, newElement);
                if (current == null) {
                    // error data
                    return "";
                }
            }
            return current.getAsString();
        } catch (Exception e) {
            return "";
        }
    }
getField
@param rowNum
@param fieldName
@return
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/decode/JsonSourceData.java