This allows setting attributes on parent elements, while preserving the order of its children, when using builder.buildObject().
I know this is some rather hakish code, as we are setting properties on an array, but I don't see any other way of providing this functionality. Please let me know, if we should follow a different approach here.
Example:
let children = [{Literal: 'foo'}, {PropertyName: 'bar'}, {Literal: 'baz'}];
children.$ = {name: 'faz'};
builder.buildObject({Parent: [children]});
This solves #624
This allows setting attributes on parent elements, while preserving the order of its children, when using
builder.buildObject()
.I know this is some rather hakish code, as we are setting properties on an array, but I don't see any other way of providing this functionality. Please let me know, if we should follow a different approach here.
Example:
leads to following result: