diff --git a/array.go b/array.go index 43fef7a..279031e 100644 --- a/array.go +++ b/array.go @@ -231,6 +231,20 @@ func (at *Array) ConvertIgnoreError() []interface{} { return res } +// ToStringSlice ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 11:42 2024/4/22 +func (at *Array) ToStringSlice() []string { + res := at.ConvertIgnoreError() + list := make([]string, 0) + for _, item := range res { + list = append(list, fmt.Sprintf("%v", item)) + } + return list +} + // Unique 对数据结果进行去重 // // Author : go_developer@163.com<白茶清欢>