← back to Flockedwallpaper
remove-specific-products.js
26 lines
const fs = require('fs');
const products = JSON.parse(fs.readFileSync('flocked-products.json', 'utf8'));
// Filter out specific products
const filtered = products.filter(p => {
// Remove ERE-44504-sample
const ere44504 = p.primarySku && p.primarySku === 'ERE-44504-sample';
// Remove all Arc de Triomphe Flock Wallpaper products
const arcTitle = p.title && p.title.toLowerCase().includes('arc de triomphe flock wallpaper');
// Remove CHENNAI COBALT FLOCK VELVET BLUE WALLPAPER
const chennaiCobalt = p.title && p.title.toUpperCase() === 'CHENNAI COBALT FLOCK VELVET BLUE WALLPAPER';
// Return true to keep, false to remove
return !ere44504 && !arcTitle && !chennaiCobalt;
});
console.log('Original count:', products.length);
console.log('Removed:', products.length - filtered.length);
console.log('New count:', filtered.length);
fs.writeFileSync('flocked-products.json', JSON.stringify(filtered, null, 2));
console.log('✓ Products file updated');