Ok thanks - but then the cloudantplus node doesn't seem to work. I had actually tried before and the node will insert only one document with the complete array in it. instead of several documents:
Just before the cloudantplus node, msg.payload is indeed an array:
payload: array[2]
0: object
1: object
And just before that it was set by moving (in a change node) the data from another msg.logs object, which itself was created before by a serie of msg.logs.push actions.
Well, I took the cloudantplus code, and ran it simply in a function node.
At least all the way to bulkDocument() function, to check the "doc" document. And it is the right array, even after parseMessage() function.
So everything seems ok just before passing the bulk command.
I don't get it.
doc: array[2]
0: object
1: object
data: array[2]
0: object
1: object
type: "object"
proto: "[object Array]"
form cloudantplus code:
var data = msg.payload;
delete data._msgid;
var root = "payload";
var doc = parseMessage(data, root);
msg.doc=doc;
msg.data = data;
msg.type = typeof msg;
msg.proto = Object.prototype.toString.call( doc );
return msg;
<with all the functions below (skipping here)>