Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Referring to segment value without array syntax? (http://www.mirthcorp.com/community/forums/showthread.php?t=215923)

tparvi 04-21-2016 03:01 AM

Referring to segment value without array syntax?
Is there a way to set a segment value without using multiple array syntax like this:


tmp['PID']['PID.4']['PID.4.1'] = "value";
The reason I'm asking is because I want to use external json file to configure where certain values are written. The json file could have something like this (I made up the syntax):


lastName : "PID.PID.4.PID.4.1"
This means lastName should be written into that segment and then in code I could just write:


tmp[settings.lastName] = value;
Is there simple way to achieve this?

narupley 04-21-2016 07:23 AM

Not all in one bracket like you indicated, but you could just write a function to do that.

All times are GMT -8. The time now is 10:02 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation