Используя сладкий способ ES6, чистый и аккуратный раствор.
Используя индекс:
const data = [{"barcode":"","description":"META AM 29 XX Edition Large","description2":"","group":"COM20"},{"barcode":"","description":"META AM 29 TEAM Large","description2":"","group":"COM20"}];
const format = (data) =>
data.map(({ description = "", ...rest }) => ({
...rest,
description: description.substring(0, description.lastIndexOf(" ")),
}));
console.log(format(data));
Использование разделения:
const data = [{"barcode":"","description":"META AM 29 XX Edition Large","description2":"","group":"COM20"},{"barcode":"","description":"META AM 29 TEAM Large","description2":"","group":"COM20"}];
const format = (data) =>
data.map(({ description = "", rest }) => ({
...rest,
description: description.split(" ").slice(0, -1).join(" "),
}));
console.log(format(data));