web stats
Mirth Community - View Single Post - Iterate through ChannelMap values
View Single Post
Old 07-22-2015, 08:40 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road

The maps all implement the Map interface, so you can, for example, do this:

for each (entry in channelMap.entrySet().toArray()) {
    var key = entry.getKey();
    var value = entry.getValue();
There's also keySet() and values() to return only the keys or values respectively. Note that the maps are not linked, so there is no determinate order of keys or values.
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

- How do I foo?
- You just bar.
Reply With Quote