Skip to content

Commit 6911372

Browse files
committed
Fix duplicate distinct method call from only method
1 parent b747cb6 commit 6911372

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

jsonq.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,7 @@ func (j *JSONQ) sortBy(property string, asc bool) *JSONQ {
479479
// only return selected properties in result
480480
func (j *JSONQ) only(properties ...string) interface{} {
481481
result := []interface{}{}
482-
if j.distinctProperty != "" {
483-
j.distinct()
484-
}
482+
485483
if aa, ok := j.jsonContent.([]interface{}); ok {
486484
for _, am := range aa {
487485
tmap := map[string]interface{}{}

0 commit comments

Comments
 (0)