Hi all, how do I check json for validity?
Example: there comes a request, site.ru/api/test?service=facebook
If this service does not exist then ignore
const a = ['FACEBOOK', 'EXPRESS']
If the request arrives with what you need, then keep working, if not, then ignore it
As I understand it, I need a Boolean value
site.ru/api/test?service=facebook <= work next()
site.ru/api/test?service=test <= stop work
I apologize if I've misrepresented the point
I tried it this way:
console.log(a == service)