Back-end Development Exam 2

Hey guys, very much stuck on this question

Complete the GET /banks/:vaultname route. The route should do three things:

  1. Capture the URL param value of vaultname into a const variable named specificVaultName.
  2. Create a new variable called specificVaultAmount that stores the value of the vault property of a specific vault in the banks object. Utilize the specificVaultName variable created in the previous step so that the new variable accesses the vault relative to the value of the URL param.
  3. Send the specificVaultAmount variable created in the previous step as a JSON response.

So far I’ve come up with:
app.get(‘/banks/:vaultname’, (req, res, next) => {
const specificVaultName = req.params.vaultname;
let specificVaultAmount = banks[specificVaultName]
res.json(specificVaultAmount)
});

But it doesn’t get the right values, any tips would be much appreciated

I’m sorry but we cannot help with exams.