YUM: Find in which yum group a package belongs

I was looking for a way to identify in which yum package group a specific package belongs. This helps me filter out the less useful packages on Satellite 6 content views. This is a more simple method then I would like and doesn’t work from inside a script but it does what it should

yum groupinfo '*' | less +/package