title: Convert object to array of strings?
body: <p>I am writing in my save method but here am getting as a list of array. but wanted to convert to set of string.</p>
  
  <pre><code>   mySys: $scope.stringArrayToObjectArray($scope.editmySystems,"name");
  </code></pre>
  
  <p>$scope.editmySystems holds value-</p>
  
  <pre><code> 0 :f
    id: svg
    name:"JASSI"
   1 :f
    id: svg2
    name:"JASSYY" 
  
   length: 2
  </code></pre>
  
  <p>So for conversion i wrote one function-</p>
  
  <pre><code>   $scope.stringArrayToObjectArray = function(stringArray, fieldName)   {
      var objectArr = [];
      angular.forEach(stringArray, function(singleString) {
  
          objectArr[fieldName]=singleString.name;
  
      });
      return objectArr;
  };
  </code></pre>
  
  <p>currently objectArr is returning as-</p>
  
  <pre><code>     name: "JASON2"
  </code></pre>
  
  <p>Expected o/p- objectArr should return-</p>
  
  <pre><code>     name: ["JASSI","JASSYY"]
  </code></pre>
  
  <p>Please suggest</p>