Data massaging in json response : <p>I have written the following code for in angular for a $http get service call</p>

<pre><code>  var country = "http://localhost:3000/json/country.json";
        $http.get(timeZoneUrl).then(function (response) {
            $ctrl.timezone = response.data;
            console.log(response.data);
        });
</code></pre>

<p>Everything works fine and i am getting response as below.</p>

<pre><code>  [{
    "region": "Africa",
    "country": "South Africa"
  },
  {
    "region": "Europe",
    "country": "Spain"
  }];
</code></pre>

<p>I would like to have the json response massaged and to update the key from the UI. i want the response to be in the following format</p>

<pre><code> [{
     "value": "Africa",
     "label": "South Africa"
   },
   {
     "value": "Europe",
     "label": "Spain"
 }];
</code></pre>
