This would be awesome indeed. I would like to add a custom location field to groups so that I can use the g.json output to generate a map based on the groups and amount of members.
I’ll experiment a bit with your suggestion. Do you also have some more info about how to use this snippet? Can it be used in a custom theme component? How would someone do that? Has anyone already used it?
To add custom fields to models (topics, categories, groups), the following topic from @angus really lays it out as well as you’re likely to find:
He has put together some sample code specific to topics and categories - I believe the code translates generally well for adding custom fields to groups as well.
This post from me on that topic lays out how I’ve used the resource that Angus has put together: