I build a RESTful api with node.js and express / koa.
I want to filter the JSON data input - for security reasons as well to have only the needed business specific properties. After filtering the business-specific validation takes place.
How can I throw away unwanted JSON / JS object properties - i.e. properties not in my database schema as well as empty properties?
- Define Schema & filter according to this? Using e.g. http://ift.tt/1I4G42a
- Any configurable filtering available?
Aucun commentaire:
Enregistrer un commentaire