Position of added member in group

i m working on a diagram where i add nodes to a group programmatically
Screenshot%20from%202020-02-27%2017-40-58
when i click on load parent a new node is added and the attribute is added as child of loaded node
Screenshot%20from%202020-02-27%2017-41-13
what i want is to keep the attribute at its place and place the parent above it

Is your Group.layout a GridLayout? I think you will want to set GridLayout | GoJS API and GridLayout | GoJS API so that you have complete control over the ordering. The same holds true if you are using a TreeLayout.

layout:
      this.Go(go.TreeLayout, {
        alignment: go.TreeLayout.AlignmentStart,
        angle: 0,
        compaction: go.TreeLayout.CompactionNone,
        layerSpacing: 19,
        layerSpacingParentOverlap: 1,
        nodeIndentPastParent: 1.0,
        nodeIndent: 4,
        nodeSpacing: 1,
        setsPortSpot: false,
        setsChildPortSpot: false
      })

this is my layout