Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   HTTP Listener - JSON Array (http://www.mirthcorp.com/community/forums/showthread.php?t=217007)

iamawake 03-11-2017 08:06 AM

HTTP Listener - JSON Array
I have a channel with an HTTP Listener source and I need to create an HL7 message from the JSON being sent. Does anyone have an example of how I can iterate through multiple child records being sent in the JSON message? I have not worked with JSON before so I apologize if this question is ridiculously simple. Below is a similar example of what this channel would be receiving. Since there would be an array sent, I would like to have a for each loop somehow but not sure how to grab the values. Thank you in advance for any assistance.

"id": "12345",
"location": "LMNOP",
"field01": "aaaaa",
"field02": "bbbbb",
"field03": "ccccc",
"field04": "ddddd"
"field01": "eeeee",
"field02": "fffff",
"field03": "ggggg",
"field04": "hhhhh"
"field01": "iiiii",
"field02": "jjjjj",
"field03": "kkkkk",
"field04": "lllll"

All times are GMT -8. The time now is 01:49 PM.

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