How to print object

I want to print a specific object in my ts file

below my response Object { message: “Mail Sent Successfully”, code: “200” }

I want to print code i tired to print like this data.code but showing an error
Please help me
Thanks

I have fixed my issues

am do like this

let response = JSON.parse(JSON.stringify(data))
			console.log(response.code)

Thanks