Github user mattyb149 commented on a diff in the pull request: https://github.com/apache/nifi/pull/2778#discussion_r194241320 --- Diff: nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongoRecord.java --- @@ -154,4 +154,28 @@ public void onTrigger(final ProcessContext context, final ProcessSession session } session.commit(); } + + private Document convertArrays(Document doc) { + Document retVal = new Document(); + for (Map.Entry<String, Object> entry : doc.entrySet()) { + if (entry.getValue() != null && entry.getValue().getClass().isArray()) { + List items = new ArrayList(); + Object[] values = (Object[])entry.getValue(); + for (int index = 0; index < values.length; index++) { --- End diff -- I haven't tried this yet, but does this handle arrays of arrays? If not, should it?
---