SP Widget - How can I read object in client controller
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 04:10 AM
Hi,
I am returning API response in Server script and while reading the same response in Client controller, it is getting displayed as on object.
How can I read/ access the object? Please suggest.
In the below code, I was trying to access all the mail present in the response.
response.data==>[object Object]
Server script :
Client script :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 04:20 AM
Hi @Ankita9793
can you try the below code client side?
var res1 = response.validateddominoMembers;
console.log(res1);
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 04:59 AM
Hi @dgarad
Thanks for your response!
It did not work, Please see below ss
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 05:32 AM
Hi @Ankita9793
try the code below
var res3 =JSON.stringify( response);
console.log('RES3' +res3);
.
Thanks
dgarad