
Use this javascript code to convert minified JSON string data into readable content so you can easily map relevant items such as pricing info, merchant names, buy URL
Use this JS code in a function node right after the Avantlink product search API, and modify as you wish:
const rawData = $input.all()[0].json.data; // explicitly take the first input
const items = JSON.parse(rawData);
// Return array of individual product objects
return items.map(item => ({
json: {
strProductName: item.strProductName,
dblProductPrice: item.dblProductPrice,
dblProductSalePrice: item.dblProductSalePrice,
strBuyURL: item.strBuyURL,
strBrandName: item.strBrandName,
strMediumImage: item.strMediumImage,
}
}));