web stats
Mirth Community - View Single Post - Mirth Connect CSV File to JSON
View Single Post
Old 07-10-2013, 02:14 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road

Originally Posted by cherribuggy View Post
Error Message: Object Reference not set to an instance of an object

This is what I have in the transformer:
var header = msg.row[0].children();
var jsonObject = {'orders':[]};
for (var i = 1; i <= msg.row.length()-1; i++) {
var order = {};
for (var j = 0; j <= header.length()-1; j++)
order[header[j].toString()] = msg.row[i].children()[j].toString();


I'm so close!!! Thank you for all your help today.
Can you include the updated channel you're using, and the full error stacktrace?
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