- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 12:17 AM
Hi Team,
I got the result like below:
[{"title":"Students","link":"https:\/\/google.com\/wiki\/students\/"},{"title":"Control","link":"https:\/\/google.com\/wiki\/control\/"},{"title":"IQ- Engine","link":"https:\/\/google.com\/wiki\/iq-engine\/"}]
My requirement is how to load the flow designer outputs variables individually
Like.,
title : Students Link : https:\/\/google.com\/wiki\/students\/
title : Control, Link : https:\/\/google.com\/wiki\/control\/
title : IQ- Engine, Link : https:\/\/google.com\/wiki\/iq-engine\/
Help me on the same
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 06:45 AM
Hi @AnilM99, can you try below?
var response = '[{"title":"Students","link":"https://google.com/wiki/students/"},{"title":"Control","link":"https://google.com/wiki/control/"},{"title":"IQ-Engine","link":"https://google.com/wiki/iq-engine/"}]';
var parsedResponse = JSON.parse(response);
var firstObj = parsedResponse[0];
var secondObj = parsedResponse[1];
var thirdObj = parsedResponse[2];
Regards,
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 06:52 AM
Hi @AnilM99
try below code
var result = '[{"title":"Students","link":"https:\/\/google.com\/wiki\/students\/"},{"title":"Control","link":"https:\/\/google.com\/wiki\/control\/"},{"title":"IQ- Engine","link":"https:\/\/google.com\/wiki\/iq-engine\/"}]';
var resultObj = JSON.parse(result);
for(var i = 0; i<resultObj.length; i++){
gs.log("title: "+resultObj[i].title +" link : "+resultObj[i].link);
}
Thanks
dgarad