- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 04:03 AM - edited 01-27-2023 04:40 AM
Hi,
We are writing the below code in a flow designer action - Error: Unexpected token in object literal,Detail: Unexpected token in object literal. Why are we getting this error?
(function execute(inputs, outputs) {
// ... code ...
var nameValues = JSON.stringify(inputs.Additionalfields);
var obj;
nameValues = JSON.parse(JSON.parse(nameValues));
var encodedQuery = '';
gs.info('ain_sud_spoke1 ' + typeof nameValues);
var keys = (Object.keys(nameValues));
for(var i=0; i<keys.length-1; i++){
encodedQuery += '' + keys[i] + '=' + nameValues[keys[i]] + '^';
}
encodedQuery += '' + keys[i] + '=' + nameValues[keys[i]];
outputs.encoded_query = encodedQuery;
})(inputs, outputs);
We are using this particular action in a flow in flow designer for the 'Update Issue' action in JIRA spoke.
Regards,
Sudhangshu
Solved! Go to Solution.