I'm waiting for something like the following from the front end
....?isUpdated=true
so I did something like this in code (as I'm processing only isUpdated=true, false need to be ignored)
var isUpdated = (req.query.isUpdated === 'true')
but it seems bit odd to me.
How to do this in proper way? I mean to parse a Boolean parameter from the query string.
Boolean(req.query.isUpdated)work?Boolean("false")will evaluate to true. It is, after all, a valid string ; )