Grasshopper / rhino3dm (JS) communication - import multiple meshes

Hello,

I am trying to import multiple meshes with rhino3dm & grasshopper script (with proper input). However - when I construct the meshes, pack them into array and send as encoded values - the grasshopper fails to run because of invalid arguments provided (array instead of object). Can I somehow enforce array items casting to proper type such a mesh? What am I doing wrong?

The grasshopper file is 100% valid as without external input it works just fine.

My procedure:

  1. Create several Rhino.mesh instances from rhino3dm in nodejs script
  2. Call the definition solve with proper params (passing the data as:
inputs: {
    mesh: JSON.stringify([ rhinoMesh1.encode(), rhinoMesh2.encode(), rhinoMesh3.encode() ])
}
  1. Receive an error described above.

Check out this example: rhino-developer-samples/compute/js/SampleGHClash at 7 · mcneel/rhino-developer-samples · GitHub

Specifically this section: rhino-developer-samples/script.js at 7 · mcneel/rhino-developer-samples · GitHub