toJson method
Implementation
Map<String, dynamic> toJson() {
List<Map<String, dynamic>> productsJSON = [];
for (var product in this.products) {
productsJSON.add(product.toJson());
}
return {
'impressionListName': this.impressionListName,
'products': productsJSON
};
}