web stats
Mirth Community - View Single Post - Mirth Transformer converts \ to \\ when converting from hl7 to JSON
View Single Post
  #3  
Old 07-22-2019, 10:46 AM
Golfmachine Golfmachine is offline
Mirth Newb
 
Join Date: Jun 2019
Posts: 13
Golfmachine is on a distinguished road
Default

Just saw the reply now. Sorry but I'm actually not sure how to parse the JSON to an object? I tried to make a new javascrit step with:

var obj = JSON.parse(tmp['data']['result']['results_data'][i]['value'])

All I get is the following error:
DETAILS: SyntaxError: Unexpected token: \
at dec9c529-a782-4371-a68e-0571c3ad1a93:889 (doTransform)
at dec9c529-a782-4371-a68e-0571c3ad1a93:932 (doScript)
at dec9c529-a782-4371-a68e-0571c3ad1a93:934
at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.doCall(JavaS criptFilterTransformer.java:154)
at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.doCall(JavaS criptFilterTransformer.java:119)
at com.mirth.connect.server.util.javascript.JavaScrip tTask.call(JavaScriptTask.java:113)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
Reply With Quote