title: convert Array to object Angularjs
body: <p>I have an array like <code>var names=["price","quality","service"]</code>, I have to convert that array to object like <code>names=[{"name":"price", "value":"1.3"},{"name":"quality","value":"3"},{"name":"service","value":"3.4"}]</code>. Each and every time array values are different. I need to do build the input field with that values by using <code>ng-repeat</code> like</p>
  
  <pre><code>&lt;div ng-repeat="n in names"&gt;
        &lt;input name="rating" ng-model="n" value="0"/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How I can fetch the values as objects when user submits the form. can any one help me.</p>
  
  <p><strong>Update</strong></p>
  
  <p>I need json as like this:::</p>
  
  <p><code>names=[{"name":"price", "value":"1.3"},{"name":"quality","value":"3"},{"name":"service","value":"3.4"}]</code></p>
  
  <p>ThanQ!</p>