web stats
HTTP Listener - JSON Array - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-11-2017, 07:06 AM
iamawake iamawake is offline
Mirth Newb
 
Join Date: Nov 2016
Posts: 7
iamawake is on a distinguished road
Default 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",
"visitList":
[{
"field01": "aaaaa",
"field02": "bbbbb",
"field03": "ccccc",
"field04": "ddddd"
},
{
"field01": "eeeee",
"field02": "fffff",
"field03": "ggggg",
"field04": "hhhhh"
},
{
"field01": "iiiii",
"field02": "jjjjj",
"field03": "kkkkk",
"field04": "lllll"
}]
}
Reply With Quote
Reply

Tags
http listener, json

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:52 PM.


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