I'm trying to get values from json, come from web-service, but when I try to use JSON.parse(variable), It throws a excepetion "SyntaxError: Unexpected token: t (script#4)". I'm sure that this script works, I work very well in other editor.
Below the mentioned json.
[
{
"id": "787365732584980480",
"numeroProposta": "151041",
"cliente": {
"id": "779795407335784449",
"idExterno": "FUNCAO_06170733926",
"emails": [
"email": "tatata@tata.tata.pr.gov.br"
}
]
},
"condicoes": [
"id": "787365732589174784",
"numeroParcelas": "0"
],
"acaoId": "758657009895284736",
"acaoNome": "AcaoDescontoNatalAntecipado"
Hi Luiz,
You need to set the Compatibility mode on, just click on the checkbox in the bottom of the script window.
Best regards
Thanks Paulo, but I've already tried it, also doesn't work
I did something similar a few days ago.
My json to parse was of type string before the javascript step, so make sure your result or resultado is a string.
thanks man, I managed to do.
tell me now, I'm trying to generate a new row each object from my array json, do you know how to do?
my loop overrides the last value, so at the end I've just one row, even my json having many objects.
For that probably the best would be to use the JSON Input step for the result column, and then convert the columns to rows.
I managed to make thanks to you....
Your help was so helpfull, thanks a lot Paulo