Format of Type Object Changing in Function Call


The structure of my object is changing in the .js method that I have implemented.

Question: Why does the structure change to ObjMapp? How can I stop that (if it’s possible to stop)?

// function definition
hdpMigrateCDXBatch: function(objs: [Obj], info: [Obj]): boolean js server

// How it is called in the map function of Stage2ProdMigrationJob.js
HDPPipeline.hdpMigrateCDXBatch(upserted.objs, hdpAnnInfo);

// Sample contents of hdpAnnInfo right before the function call

// Sample contents of what the info variable from the hdpMigrateCDXBatch argument looks like inside the function


yes this is expected that an arbitrary JavaScript object will get “auto boxed” using ObjMap type (that mixes Obj)

If is a not a best practice to define apis using generic types like Obj - however if intension is that info suppose to be untyped / unstructured then json value type should be used - again bad idea and it’s much better to define the c3typ you wish to employ directly.