- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2016 11:51 PM
Hello,
This is a part of my JSON message which accepts array input
{
"value": {"array": { "elements": [
{"number": {"value": 80}},
{"number": { "value": 100 }}
]}
},
"type": "Array/number",
"name": "cdmAddDisk",
"scope": "local"
}
The value I have to pass here comes from a Request Item multi line text separated by commas.
But it does not accept it. Any idea?
Thanks,
Vinitha.K
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 03:00 AM
I got it by setting r.setStringParameterNoEscape();
r.setStringParameterNoEscape("cdmAddDisk",global.JSON.stringify(str.split(',')).replace(']',',]').replace(/\"/g,"{\"number\": {\"value\":").replace(/{\"number\": {\"value\":,/g,"}},").replace(',]',']'));
Thank you so much for the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2016 11:58 PM
Can u pls give some clarity on how you are setting the value....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 12:02 AM
I try to send it as '70,80' .
Can you please let em know on how to set/get the value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 12:19 AM
Try below...I tested and its works for me.
var str = '1,2,3,4,5';
gs.print(global.JSON.stringify(str.split(',')));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 12:27 AM
I get the status code as 400 and it did not pass through. Should I change the JSON message?