I have an object which is converted to string in a text field. How can I convert this to a JSON string.
String of object:
Profile:[UID=, crmId=0000o00002XXXXxXXX, [email protected], firstname=null, lastname=test]
I tried JSON.serialize(textfield); but this only sets "" arount the text
I want to convert this to the following:
{ "email" : "[email protected]",
"crmId" : "0000o00002XXXXxXXX",
"firstname" : "null",
"lastname" : "test",
"UID" : ""
}