Hello guys, im trying to pase a json with:
return [{json:{new_value:JSON.parse(items[0].json.propertyName)}}];
but im geting this error: ERROR: Unexpected token in JSON at position, but this only happens when I put it as an expression of an output.
When I try to perform the same process but using a manual variable with the same json body, works normally
I created two variables one coming from the text of imap, is a json.
Another, I put the json manually in the variable to test.
When
return [{json:{new_value:JSON.parse(items[0].json.propertyName)}}];
output error
but, when
return [{json:{new_value:JSON.parse(items[0].json.propertyName1)}}];
Works
My question is: why can’t i convert to json if the text is identical?
