I have access to an array of JSON objects.
[
{
Id: "1",
StartNo: "1",
ChipNo: "0",
CategoryId: "0",
Wave: "0",
Club: "",
FirstName: "Lotta",
LastName: "Svenström",
FullName: "Lotta Svenström",
ZipCode: "24231"
},
{...}
]
My goal is to create a new data structure that only includes the StartNo and FullName properties. How can I accomplish this?
I attempted the following:
$scope.runners = [];
for(var i = 0; i<data.length; i++){
$scope.runners[i].StartNo = data[i].StartNo;
$scope.runners[i].Fullname = data[i].Fullname;
}
However, this approach is not successful in achieving my desired outcome.