What is the function of toJSON ?
277k points Registered user
It returns a shallow copy of the model’s attribute for JSON stringification. This function is used for persistence, serialization and for augmentation before being sent to the server. This does not return a JSON string
Get access to your account and question