这有效:tmp ['MSH'] ['MSH.4'] ['MSH.4.1'] =“xyz”;
tmp [['MSH'] ['MSH.4'] ['MSH.4.1']] =“xyz”; //这不起作用。
我试图将json的值作为带括号的字符串
我需要括号或任何其他解决方案
我正在尝试将值保存在HL7消息的以下位置。 请帮忙
线号:45 DETAILS:TypeError:无法从undefined中读取属性“MSH.4.1” at 6520e152-1c7a-41bc-9642-e5f97cd11d98:45(doTransform) at 6520e152-1c7a-41bc-9642-e5f97cd11d98:48(doScript) 在6520e152-1c7a-41bc-9642-e5f97cd11d98:50 at com.mirth.connect.server.transformers.JavaScriptFilterTransformer $ FilterTransformerTask.call(JavaScriptFilterTransformer.java:134) at com.mirth.connect.server.transformers.JavaScriptFilterTransformer $ FilterTransformerTask.call(JavaScriptFilterTransformer.java:100) 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) 在java.lang.Thread.run(未知来源)
答案 0 :(得分:0)
尝试
tmp['MSH']['MSH.4']['MSH.4.1'] = '[xyz]';