Есть объект:
{
"id": 1,
"name": "Тест",
"popularity": 4,
"published_at": "2021-07-22T20:18:08.000Z",
"created_at": "2021-07-11T23:33:52.000Z",
"updated_at": "2021-07-22T20:19:37.000Z",
"slug": "test",
"price": 3000,
"sale": 2000,
"variations": [
{
"id": 1,
"color": {
"id": 1,
"name": "Черный",
"slug": "chernyj",
"published_at": "2021-07-22T20:00:25.000Z",
"created_at": "2021-07-22T20:00:24.000Z",
"updated_at": "2021-07-22T20:00:26.000Z"
},
"size": {
"id": 2,
"name": "M",
"slug": "m",
"published_at": "2021-07-22T20:00:01.000Z",
"created_at": "2021-07-22T19:59:59.000Z",
"updated_at": "2021-07-22T20:00:01.000Z"
}
},
{
"id": 2,
"color": {
"id": 3,
"name": "Белый",
"slug": "belyj",
"published_at": "2021-07-22T20:00:43.000Z",
"created_at": "2021-07-22T20:00:42.000Z",
"updated_at": "2021-07-22T20:00:43.000Z"
},
"size": {
"id": 2,
"name": "M",
"slug": "m",
"published_at": "2021-07-22T20:00:01.000Z",
"created_at": "2021-07-22T19:59:59.000Z",
"updated_at": "2021-07-22T20:00:01.000Z"
}
}
],
}
Как из него получить массив уникальных цветов (объекты COLOR в VARIATIONS)?