title: Change value in JSON array and return updated array JS
body: <p>I've got a JSON object where I get a product price (number) as a value.</p>
  
  <p><em>What I want is to convert the price values into strings in the existing object</em></p>
  
  <p>I use <strong>map</strong> function:</p>
  
  <pre><code>var prods = [
    {
      "id": "id-1",
      "price": 239000,
      "info": "info-1"
    },
  
    {
      "id": "id-2",
      "price": 90770,
      "info": "info-2"
    },
  
    {
      "id": "id-3",
      "price": 200787868,
      "info": "info-3"
    },
  ];
  
  
  prods.map(function(a) {
           a.price.toString()
          .replace(/(\d)(?=(\d{3})+(\D|$))/g, '$1 ');
  })
  </code></pre>
  
  <p>I expect the <strong>map</strong> function to update my <strong>prods</strong> object, but it stays the same.</p>
  
  <p><a href="https://jsbin.com/zorewaf/edit?html,css,js,console,output" rel="nofollow noreferrer">(Un)working JS Bin</a></p>
  
  <p>I wonder, how to update the initial object to the one I need?</p>