From cd11f3c699fedf32e0c711e5c20fa44a4bac89bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sun, 30 Jan 2022 23:33:44 +0800 Subject: [PATCH] save code --- json_tool/gabs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 { // 已经处理过, 不再重复处理