function Person(_name, _id, _salary){
this.Name = _name;
this.Id = _id;
this.Salary = _salary;
}
Person.prototype.f_IncreaseSalary = function( _percentage ){
this.Salary *= _percentage;
}
var per = new Person("cem",10,15000);
1) I can access to per.f_IncreaseSalary(0.2)
but what if i create this object from JSON string how can i access f_IncreaseSalary function?
var sPer = {"Person" : {"Name":"Cem", "Id":10, "Salary":15000} };
sPer.f_IncreaseSalary(0.2); // it won't!
2) How can i create sPer object which has functions of Person class?
3) How can i understand sPer
has f_IncreaseSalary
function?