Right now I have data like the below:
[
{
"integration_id":7,
"campaign_id":4,
"integration_name":"unbounce",
"url_string":"23432fsaf",
"created_at":"2019-12-23 21:05:45",
"updated_at":"2019-12-23 21:05:45"
},
{
"integration_id":37,
"campaign_id":4,
"integration_name":"clickfunnels",
"url_string":"yttzbe9rwd",
"created_at":"2019-12-27 19:19:02",
"updated_at":"2019-12-27 19:19:02"
},
{
"integration_id":47,
"campaign_id":4,
"integration_name":"instapage",
"url_string":"vaqcjq8iy2",
"created_at":"2019-12-29 16:52:01",
"updated_at":"2019-12-29 16:52:01"
}
]
But I want to transform this array into an array like below:
[
{
"integration_name":"unbounce",
},
{
"integration_name":"clickfunnels",
},
{
"integration_name":"instapage",
}
]
I want to keep the integration names but remove all other properties from the items. How can I achieve this?
Array.prototype.maparray.map(({integration_name}) => ({integration_name}));