Home » Backbone.js model.toJSON()

Backbone.js model.toJSON()

by Online Tutorials Library

Backbone.js model.toJSON()

The Backbone.js toJSON model returns copy of the attributes as an object for JSON stringification.

Syntax:

Parameter explanation:

options: : It defines parameters such as variable name and id used for a model when returning shallow copy of model’s attributes.

Let’s take an example.

See this example:

You may also like