**Filter unique object from amenities list like result using JavaScript**
amenities = [
{
“name”: “Pool”
},
{
“name”: “Laundry”
},
{
“name”: “Wifi”
},
{
“name”: “BBQ Grill”
},
{
“name”: “Barth top”
},
{
“name”: “Pool”
},
{
“name”: “Laundry”
},
{
“name”: “Wifi”
},
{
“name”: “BBQ Grill”
},
{
“name”: “Barth top”
},
{
“name”: “Pool”
},
{
“name”: “Laundry”
},
{
“name”: “Wifi”
},
{
“name”: “BBQ Grill”
},
{
“name”: “Barth top”
}
]
result = [
{
"name": "Pool"
},
{
"name": "Laundry"
},
{
"name": "Wifi"
},
{
"name": "BBQ Grill"
},
{
"name": "Barth top"
}]