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: Test it NowOutput: Save the above code in tojson.html file and open this file in a new browser. Next TopicBackbone.js Sync |