title: convert value of json object from string in array to number using floatparse
body: <p>I  have a array with json objects. some objects properties  values I  need to convert to number from string. I  need to push converted number value json to new list.  I  tried using floatparse but didnt succeed.
  code</p>
  <pre><code>var json = [{
      &quot;id&quot; : &quot;0&quot;, 
      &quot;msg&quot;   : &quot;hi&quot;,
      &quot;cost&quot; : &quot;250.24&quot;,
      &quot;discount&quot;: &quot;10&quot;
  },
  {
      &quot;id&quot; : &quot;1&quot;, 
      &quot;msg&quot;   : &quot;there&quot;,
      &quot;cost&quot; : &quot;45.00&quot;,
      &quot;discount&quot;: &quot;0&quot;
  }];
  
  var  json1 = [];
  
  for (var key in json) {
         if (json.hasOwnProperty(key)) {
      
            for (const prop in json[key]) {        
            const parsed = parseFloat(json[key][prop]);              
            res[key][prop] = isNaN(parsed) ? json[key][prop] : parsed;                                        
             //  need to  push  array of modified json object value converted to number from string into json1  
            }
           
         }
      }
  </code></pre>