简体   繁体   中英

Saving data from a Rivets.js objects

How can I export the data in the object that's bind to rivets view?

When I try to send the whole object (including rivets getters and setters and other methods I created) with a jQuery AJAX, my browser just crashes.

Maybe there is a JavaScript or jQuery function that allows me extract only the data from an object without its methods?

I really need a way of doing this without manually creating a data object to send.

解决方案: JSON.parse(JSON.stringify(bindedObject))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM