0 votes
in Technology by (1.7m points)

What is the function of toJSON ?

1 Answer

0 votes
by (1.7m points)

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