diff --git a/json_tool/gabs.go b/json_tool/gabs.go index 71553d5..0d6f030 100644 --- a/json_tool/gabs.go +++ b/json_tool/gabs.go @@ -181,7 +181,7 @@ func (df *DataFilter) formatRule() { } // 数组层级深度不同,重新对对齐数据 diffArr := sourcePathArr[0 : len(sourcePathArr)-len(mapPathArr)-1] - df.dealDiffArr(diffArr) + df.dealDiffArr(diffArr, sourcePathArr[len(sourcePathArr)-len(mapPathArr)-1:], mapPathArr) } } else { if df.pathIsArrayValue(item.MapKey) { @@ -207,7 +207,7 @@ func (df *DataFilter) formatRule() { // Author : go_developer@163.com<白茶清欢> // // Date : 5:04 下午 2022/1/25 -func (df *DataFilter) dealDiffArr(diffArr []string) { +func (df *DataFilter) dealDiffArr(diffArr []string, sourceAfterArr []string, mapArr []string) { diffArrStr := strings.Join(diffArr, ".[].") if _, exist := df.hasDealDiffPath[diffArrStr]; exist { // 已经处理过, 不再重复处理