How can i convert this string into object so that i can access it's property like obj.Name ?
{
Name = Mahbubr Rahman,
Gender = Male,
Birthday = 1 / 5 / 1992 6: 00: 00 AM,
Email = mahbubur.rahman@ rms.com,
EmployeeType = Manager
}
I have tried with JSON.parse() and eval but getting nothing. Any help ?
var obj = JSON.parse(
JSON.stringify('{ Name = Mahbubr Rahman,Gender = Male, Birthday = 1/5/1992 6:00:00 AM, Email = [email protected], EmployeeType = Manager }'.replace(/=/g, ':'))
);
JSON.parse(). Having to hack around a string in to the right format seems to be fixing the wrong part of the problem.