I need to apply group on associated attributes to apply it on pie_chart which is the method of kick chart so I just need to fetch the associated object attribute like
= pie_chart array.group(:user)
it returns the user object but I need to apply group on user attribute which is username so please if anybody has solution of this answer me.