Skip to content

Commit

Permalink
Fix duplicate distinct method call from only method
Browse files Browse the repository at this point in the history
  • Loading branch information
thedevsaddam committed May 26, 2019
1 parent b747cb6 commit 6911372
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions jsonq.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,7 @@ func (j *JSONQ) sortBy(property string, asc bool) *JSONQ {
// only return selected properties in result
func (j *JSONQ) only(properties ...string) interface{} {
result := []interface{}{}
if j.distinctProperty != "" {
j.distinct()
}

if aa, ok := j.jsonContent.([]interface{}); ok {
for _, am := range aa {
tmap := map[string]interface{}{}
Expand Down

0 comments on commit 6911372

Please sign in to comment.