Issue
I have the following JavaScript object :
[{
Name: "Ishan",
Code: 1,
Is_Intern: "Yes",
DateOfJoining: "01/02/2022",
Skills: ["VB, DOT.NET, Angular"],
Status: "Working"
}]
How can I add an item to the skills array in this object?
I didn't find any particular article regarding this.
Solution
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);
Answered By - Jagadeesh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.