In this example it will check if angular.isArray returns true then push obj's value in 'nameArr' array and show the name in result window.
angular.isArray