How can I convert a list of strings into an Object?
var flattenList = string.Join(",", jsonVars);
var convJsonVars = JsonConvert.SerializeObject(flattenList);
convJsonVars = "{" + convJsonVars + "}";
var emailData = JsonConvert.DeserializeObject<object>(convJsonVars);
After I Serialize flattenList, these are the results:
"\"tenant_background_color\":\"#c41211\",\"tenant_logo_link\":\"https://imagelink.com\",\"tenant_font_color\":\"#FFFFFF\",\"tenant_name\":\"TNAME\",\"recipient_name\":\"User One\",\"login_link\":\"https://localhost:44330/\",\"verification_link\":\"https://localhost:44330/Link?Key=7b6c12fe-7658-45c5-a5c9-df9900231c6b-f7ea4ae9-3037-4dc5-98dd-e34a33770bb1\""
However, when I try to Deserialize it into an object type and submit it to Sendgrids api, I always get the error that I am passing them a string instead of an Object type.
EDIT:
This is what jsonVars looks like now:
"\"tenant_background_color\":\"#c41211\""
Its a list of strings