I am getting an error when trying to parse and stringify some JSON data.
On this line:
this.copyOfColumns = JSON.parse(JSON.stringify(Object.assign([], this.columns)));
Here is the entire @Input (using Angular 4):
@Input()
set gridColumns(gridColumnsArr: Array<object>) {
console.log('gridColumnsArr');
console.log(gridColumnsArr);
this.columns = this.sortActiveAndInactiveColumns(gridColumnsArr);
console.log('this.columns');
console.log(this.columns);
this.copyOfColumns = JSON.parse(JSON.stringify(Object.assign([], this.columns)));
console.log('this.copyOfColumns');
console.log(this.copyOfColumns);
}
Here is the data logged to the console (this.columns)...and the error(s) following:
