Here is a snippet of code where I am trying to display columns from a table:
products: {
title: 'Prodotto',
filter: false,
class: "colonneTabella",
width: "15%",
valuePrepareFunction: (products) => {
var output ="";
var outputs = "";
products.forEach(function(item){
output = item.productDescription
/* item.variantList.forEach(function(d){
outputs= d.description;
})*/
})
return output+outputs;
}
},
products: {
title: 'Variante',
filter: false,
class: "colonneTabella",
width: "20%",
valuePrepareFunction: (variants) =>
variants.forEach(function(variant){
variant.variantList;
variant.variantList.forEach(function(d){
outputs= d.description;
})
return outputs;
})
}
Hello everyone! I'm facing an issue with ng2 smart table where I need to extract data from a JSON starting from the "products" key. The problem arises when I try to name a column "product.variantList" as it does not allow dots in the name. Any suggestions or solutions would be greatly appreciated. Thank you!