When i am trying the first method with (age => age.Book === book && age.Chapter === 1) my filter works.
When i try (age => age.Book === book && age.Chapter === chapter) it won't work.
So when i don't use a variable at chapter. it can be a number or string. then it's ok. but when i use my variable chapter. it won't work.
all my chapters are numbers. when i changed one chapter in an string (word not number) then my variable chapter did work.
Can somebody explain how i get my variable to work?
app.get("/book/:bookTitle/:bookChapter/", function(req, res){
const book = req.params.bookTitle;
const chapter = req.params.bookChapter;
const verse = req.params.bookVerse;
const text = req.params.bookText;
const getBook = verseList.filter(age => age.Book === book && age.Chapter === 1);
const getBook = verseList.filter(age => age.Book === book && age.Chapter === chapter);