I assume this is the jquery map function? Maybe punt to using underscore? Is there an underscore service wrapper? I can see this getting confusing (angular services vs jQquery functions).