var data = [{
Name: "Ishan",
Code: 1,
Is_Intern: "Yes",
DateOfJoining: "01/02/2022",
Skills: ["VB, DOT.NET, Angular"],
Status: "Working"
}]
data[0].Skills.push("New Skill");
console.log(data);
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
name = 'Angular';
myObjArray = [
{id: 1, name: "Hardik" },
{id: 2, name: "Vimal" },
{id: 3, name: "Paresh" }
];
addNew(){
this.myObjArray.unshift({id: 4, name: "Vimal"});
console.log(this.myObjArray);
}
}