I have json array - "tests" inside one of the keys is "GroupID" I wish to take all the "GroupID" and create new array that will include it (if possible as map - so no duplicated) I tried the following, but groupID contains only 1 value I tried .push, [], and many other ways and always getting errors how can I do it?
...
groupID: any[];
...
for (var index = 0; index < this.tests.length; index++) {
var element = this.tests[index];
this.groupID = element.GroupID;
}
console.log(this.groupID);