Just a question… is that the most effective way to do it if all you want to do is get all the attributes for a given group name? I am using your code to iterate over the attributes, load the group name (and cache it) then check if the group name is the one I’m looking for (for example “Specifications").
If it is, I store that attribute in an array. The net result is I have all the attributes from the “Specifications” group.
Is there a better way to do this rather than hitting the db for the group names? Is there a filter or function available?