I want it to check and then add a book if it doesn't exist. I am having trouble accessing the index('Horror') part.
const bookMap = {
'Horror' => [{
id: 9798721052927,
title: 'Dracula',
author: 'Brahm Stoker'
}],
'Romance' => [{
id: 9798721052927,
title: 'Love Story',
author: 'Brahm Stoker'
}]
}
bookMap.get('Horror').filter(e => e.title === 'Dracula')