sebastiantidare

Lieutenant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-02-14
15:12
380 views
Using ScriptVault JSON Parse inside workflow to flowdata
Hi,
So far I'm using a field, type string and Text.
I have an Array of JavaScript objects that im parsing using the ScriptVault.JSON.stringify function.
I'm passing a JSON to the workflow and I want to parse it to an object and pass it to a flowdata variable.
Now here's what works inside a mapping:
function run(){
var json = ScriptVault.JSON.parse( flowdata.get('jsonString') );
return json[0].operation;
}
run();
And this will give me the 0th object in the Array and the value of "operation". This can be passed to a flowdata variable no problem.
What I would like to do is:
function run(){
var json = ScriptVault.JSON.parse( flowdata.get('jsonString') );
return json;
}
run();
And from here use the flowdata variable containing the whole Array of objects like so:
flowdataVariable[0].operation.
How can I achieve this?
Best,
Sebastian
So far I'm using a field, type string and Text.
I have an Array of JavaScript objects that im parsing using the ScriptVault.JSON.stringify function.
I'm passing a JSON to the workflow and I want to parse it to an object and pass it to a flowdata variable.
Now here's what works inside a mapping:
function run(){
var json = ScriptVault.JSON.parse( flowdata.get('jsonString') );
return json[0].operation;
}
run();
And this will give me the 0th object in the Array and the value of "operation". This can be passed to a flowdata variable no problem.
What I would like to do is:
function run(){
var json = ScriptVault.JSON.parse( flowdata.get('jsonString') );
return json;
}
run();
And from here use the flowdata variable containing the whole Array of objects like so:
flowdataVariable[0].operation.
How can I achieve this?
Best,
Sebastian
1 Reply
AutomaticReply

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-02-20
05:30
Sebastiantidare,
It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.
These forums are peer-to-peer, best effort, volunteer run and that if your issue
is urgent or not getting a response, you might try one of the following options:
- Visit https://www.microfocus.com/support-and-services and search the knowledgebase and/or check
all the other self support options and support programs available.
- Open a service request: https://www.microfocus.com/support
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.microfocus.com)
- You might consider hiring a local partner to assist you.
https://www.partnernetprogram.com/partnerfinder/find.html
Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.microfocus.com/faq.php
Sometimes this automatic posting will alert someone that can respond.
If this is a reply to a duplicate posting or otherwise posted in error, please
ignore and accept our apologies and rest assured we will issue a stern reprimand
to our posting bot.
Good luck!
Your Micro Focus Forums Team
http://forums.microfocus.com
It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.
These forums are peer-to-peer, best effort, volunteer run and that if your issue
is urgent or not getting a response, you might try one of the following options:
- Visit https://www.microfocus.com/support-and-services and search the knowledgebase and/or check
all the other self support options and support programs available.
- Open a service request: https://www.microfocus.com/support
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.microfocus.com)
- You might consider hiring a local partner to assist you.
https://www.partnernetprogram.com/partnerfinder/find.html
Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.microfocus.com/faq.php
Sometimes this automatic posting will alert someone that can respond.
If this is a reply to a duplicate posting or otherwise posted in error, please
ignore and accept our apologies and rest assured we will issue a stern reprimand
to our posting bot.
Good luck!
Your Micro Focus Forums Team
http://forums.microfocus.com