The Zurich release has arrived! Interested in new features and functionalities? Click here for more

["[object Object]"] how to conver this datra

hemantnh
Tera Expert

["[object Object]"]

 

i am getting the data inthis format, now how can i convert in to sting or values 

3 REPLIES 3

Simon Christens
Kilo Sage

Instead of using toString() you need to use JSON.stringify(object)

Ankur Bawiskar
Tera Patron
Tera Patron

@hemantnh 

I assume you are talking about API response which you are getting

If it's REST API response then you can use JSON.stringify(object)

share your complete script

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Abhijit4
Mega Sage

@hemantnh you can always use JSON.stringify(object) to convert object into string. I believe, you must have already searched for this solution before posting question here. So, please let us know more details if we can help you further. on actual scenario.

 

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP