Batch download images from JSON files using NodeJS.
- Get started by cloning or downloading this repository.
- Create a
data.jsonfile within the projects root directory. - Open the
index.jsfile - Modify the variables within the
//Editable Contentcomments - Run the download command
npm run download
{
"${your-picture-name}": "${your-picture-link}",
}const getDownloadItem = (key) => {
return {
productImage: data[key],
productId: key
}
}
const downloadArray = Object.keys(data).map(getDownloadItem);
const totalDownloads = downloadArray.length;