How I can pass value from function to another one at router.get
router.get('/someurl', (req, res, next) => {
const token = req.headers.authorization.split(' ')[1] //jwtToken
const jwt = jwt.verify(
token,
jwtSecret
)
...do something to pass value to the next function
}, )