avoiding iterations and calling of underscore on all elements of array
Merge pull request #12917 from akshay-vishnoi/refactor

avoiding iterations and calling of underscore on all elements of array