filter can now be used as a replacement to Model#toJSON()

Removes dependency on the model instance's existing toJSON method, allowing it to be used as a replacement.