Hi,
My company has developed a web front-end that is intended to be used instead of GAX for external customers.
This is to provide them with limited control of GVP IVR's. (no one like the GAX interface

)
They are providing the data in a JSON array that looks like this.
[{"node_id":"1","status":"false","message_id":"0","next_action_id":"NULL","audio_file_path":null},{"node_id":"2","status":"false","message_id":"0","next_action_id":"NULL","audio_file_path":null},{"node_id":"3","status":"true","message_id":"1","next_action_id":"test_action","audio_file_path":"http:\/\/mnlstaging.ad.busapp\/segueapps\/ivr\/uploads\/audio-messages\/Test Message(2-23-2017).mp3"}];
I am retrieving this from a webrequest block. and assigning that to a variable varWSreturn
I am trying to populate some variables which are then used to drive various decision points and pick up audio where required.
The variables are defined as user variables .. e.g. varStatus1, varStatus2, varStatus3, varAction1, varAction2,varAction3 varAudio1,varAudio2,varAudio3 e.t.c.
Here is what I have tried as Javascript
var obj = varWSreturn;
var vstatus='varStatus';
var vaction='varAction';
var vaudio='varAudio';
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
vstatus.concat(obj[key].node_id)=obj[key].status;
vaction.concat(obj[key].node_id)=obj[key].next_action_id;
vaudio.concat(obj[key].node_id)=obj[key].audio_file_path;
So I am expecting this to loop through the string and populate the variables as I have explained above..
However, it is returning nothing..
I'm not hugely versed in javascript, other than various snippets in composer... So please excuse me if I've completely screwed this..
Any suggestions will be much appreciated (even if it means using the loop block and completely different method.
Regards
Allan