title: Vue.Js - How to parse integer array object data
body: <p>I've a response data in array object</p>
  
  <p>here my response code :</p>
  
  <pre><code>{
    "data": [
      {
        "id": 7,
        "product_name": "iPad",
        "rating": "4.00"
      },
      {
        "id": 2,
        "product_name": "iPhone",
        "rating": "3.00"
      },
      {
        "id": 8,
        "product_name": "iPod",
        "rating": "7.00"
      },
      {
        "id": 4,
        "product_name": "iMac",
        "rating": "9.00"
      }
    ],
    "status": 200,
    "error": 0
  }
  </code></pre>
  
  <p>and then i try to map the array object to parse the data 'rating' to integer, here my axios code :</p>
  
  <pre><code>getCustomerType: function(store) {
    this.loading = true
    let headers = {
      Authorization: 'Bearer ' + window.accessToken
    }
  
    axios({
      method: 'GET',
      url: baseApi(this.selectedStore.url_id, 'en', 'customertype'),
      params: this.params,
      headers: headers
    })
      .then(response =&gt; {
        this.customerTypeData = response.data.data
        for (let index = 0; index &lt; this.customerTypeData.length; index++) {
          this.customerTypeData.rating[index] = parseInt(this.customerTypeData.rating[index])
        }
        this.loading = false
      })
  }
  </code></pre>
  
  <p>But the code of parseInt it doesn't make it solve</p>
  
  <pre><code>for (let index = 0; index &lt; this.customerTypeData.length; index++) {
          this.customerTypeData.rating[index] = parseInt(this.customerTypeData.rating[index])
        }
  </code></pre>
  
  <p><strong>Expected</strong> : </p>
  
  <p>rating (by index) it change from string to number by index array</p>