I have an issue similar to this one:

[PrependTo item only ONCE in Jquery](https://stackoverflow.com/questions/45051812/prependto-item-only-once-in-jquery/)

But my DOM structure is:

```
<div class="div-class">
    <div class="child-div"></div>
</div>
<table class="table-class"></table>

```

And the desired output I would like using jQuery is: 

```
<div class="div-class">
    <div class="child-div">
        <table class="table-class"></table>
    </div><!--child-class-->
</div><!--div-class-->

```

But the code on that solution doesn't work, and I have tried to do it inside the loop, but to no avail.

Thank you.