I am having an Object (representing a project for example) which implements a tree structure:

```
class Project
{
   data: {};
   children: Array<Project>=[];
}

```

I am using an angular component from Primeng (TreeTable) to visualize this tree and let user dynamically change the tree (Adding children, changing values on data, ...).

This all works fine. But when I send my object using http.post to my backend I get an error (circular values ...). Reason for this is the component from primeng adds additional attributes to my object to manage the tree (parent, expanded, ...). The 'parent' attribute leads to this circular value issue.

Is there a way in typescript to keep my object structure in the context of my application? (Attributes added by the component are not visible to my code and will therefore ignored when using http.post)

Within the http.post function my objects must be changed to json or string. Is there a possibility to overwrite a method which avoid this error? (Like .as\_json in rails)

Thanks,
Michael