How to change nomenclature for node keys

Is there a way of changing the default values of keys for nodes.
I want to change the current naming convention for my gates from something like:
[“and”,“and-1”] to [“and-1”, “and-2”]
Here is an example of an or gate properties in an exported json file:

In this case it should automatically change to or-2
Don’t want to do it directy in the export functionality, because this should be done automatically in the diagram.

Here is an example of what I am trying to say:

The first buffer shown should have a key of buffer-1, the one in the middle (which is the second one I added), buffer-2 and the last one I added to the diagram: buffer-3. In the case I add one more it should be buffer-4.


Either set Model.makeUniqueKeyFunction (Model | GoJS API), or override Model.makeNodeDataKeyUnique (Model | GoJS API)