From b179d488be5d6259751e53e9d6f58dc2254a457c Mon Sep 17 00:00:00 2001 From: Artem Date: Thu, 12 May 2022 17:21:11 +0300 Subject: [PATCH] Fix: JSON model for set type --- internal/bcd/ast/set.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/bcd/ast/set.go b/internal/bcd/ast/set.go index c7715e98d..8e1cb3afb 100644 --- a/internal/bcd/ast/set.go +++ b/internal/bcd/ast/set.go @@ -294,7 +294,9 @@ func (set *Set) GetJSONModel(model JSONModel) { } arr := make([]JSONModel, len(set.Data)) for i := range set.Data { - set.Data[i].GetJSONModel(arr[i]) + res := make(JSONModel) + set.Data[i].GetJSONModel(res) + arr = append(arr, res) } model[set.GetName()] = arr }