let array = [
{ "name": "Ajay", "age": 17 },
{ "name": "Bobby", "age": 17 },
{ "name": "Sandy", "age": 35 }
];
array.map(item => item.age)
.filter((value, index, self) => self.indexOf(value) === index)
[17, 35]
Practical tips, tutorials & insights from the .NET Ecosystem 🚀 { C# • ASP.NET Core • Azure • Angular • AI-Assisted Dev } Building smarter with Cursor AI & GitHub Copilot ⚡
No comments:
Post a Comment