I have an object that is stored locally on my users PC, stringified with JSON. I noticed that when i parse it back the methods disappear. What is the most efficient way to augment an object with a method?
EDIT: Example:
var data = {
user: {
username: "Adam"
}
//function goes here
}
var myFunction = function(){/* code here*/}