I have the following JSON data:
$scope.users = [{ "id": 1, "first_name": "Philip", "country": "Indonesia" },
{ "id": 2, "first_name": "Judith", "country": "China" },
{ "id": 3, "first_name": "Julie", "country": "Finland"},
{ "id": 4, "first_name": "Gloria", "country": "Indonesia"}}];
and I want to add a new property like this:
$scope.users = [{ "id": 1, "first_name": "Philip", "country": "Indonesia", "new_field":4 },
{ "id": 2, "first_name": "Judith", "country": "China","new_field":4 },
{ "id": 3, "first_name": "Julie", "country": "Finland","new_field":4},
{ "id": 4, "first_name": "Gloria", "country": "Indonesia","new_field":4}}];
Is this possible? If yes, how can do this?