walter-whitelist allows you to validate (and filter) your incoming and outgoing JSON objects. You can define the fields that are allowed for your object and decide what to do in case of discrepancies.
Let me show you how it works:
And the best thing is, that is works recursively. Try it out!
You can install it using npm as usual:
Please also check the github page of walter-whitelist . It contains additional documentation and use cases.