I have these lines:
console.log(JSON.stringify(this.model.attributes));
console.log(this.model.get('name'));
And this is the output:
"{"name":"ffg","key":"1c277f82-f093-d359-4cfb-febe4614a3b1"}"
""
I'm starting with Backbone. Any ideas why the object is in the attributes but it returns empty with the get method??
EDIT:
This shouldn't affect answers, but I'm working with Phone Gap.
The 2 console.log are lines next to each other.
EDIT 2:
var temp = _(this.model.attributes).clone();
console.log(JSON.stringify(temp));
console.log(temp.name);
This logs:
{"name":"ss","questions":[],"order":0,"key":"5c35c304-4863-02c0-4d18-101c655aa4ae"}
""