Insert node object inside linkDataArray

I have defined a GraphLinksModel like this:

     archetypeNodeData: {},
     linkFromPortIdProperty: 'source',
     linkFromKeyProperty: 'sourceColumn',
     linkToPortIdProperty: 'destination',
     linkToKeyProperty: 'destinationColumn',
     // automatically update the model that is shown on this page
     'Changed': (e) => {
         if (e.isTransactionFinished) {
            console.log('Changed ' + this.diagram.model.toJson());
     nodeDataArray: this.visualOrigins,
     linkDataArray: this.relations

This generates an output:

"linkDataArray": [ 
    {"source":"Record1", "sourceColumn":"field1", "destination":"Record2", 

It is possible to generate this output, but with the javascript objects which are referencing inside it? Like this:

 "linkDataArray": [ 
    "sourceObjectNode": {sourceObjectReferenced},
    "sourceColumnObjectNode": {sourceColumnObjectNodeReferenced},
    "destinationObjectNode": {destinationObjectNodeReferenced},
    "destinationColumnNode": {destinationColumnObjectNodeReferenced}}

The purpose of this would be having the linked nodes without making any processing.

Thanks in advance

No, that is not valid JSON-format text.

Also, I do not think it makes sense to put node definitions in links. They should be in the Model.nodeDataArray, so that they can be shared by all references from links.


You are right, when i said {sourceColumnObjectNodeReferenced} i really refeer to a well-formed JSON inside:

sourceColumnObjectNodeReferenced  =  {
         "property": "value",
         "property2": "value2"

Anyway, i get your point, it not makes sense provide that info inside the links.

Thanks Walter.