Question: I have 3 Entities
1.) Checklist
2.) Task
3.) Process

```
@OneToMany(mappedBy="checklist", cascade=CascadeType.PERSIST , fetch = FetchType.LAZY)
private List<taskEntity> tasks;

@OneToOne(mappedBy="checklist", cascade=CascadeType.PERSIST, fetch = FetchType.LAZY)
private processEntity process;

```

During Retrievel I used

```
@NamedNativeQuery(name="checklistEntity.selectAll", query="SELECT * FROM CHECKLIST", resultClass=checklistEntity.class)

```

But the output contains child tables records also.

Answer: 
You can read the location list by using the following code:

```js
/* querySelector: IE8+ support */
var span = document.querySelector(".single-contact-location > span");

/* get the next node after the span */
var textNodeAfterSpan = span.nextSibling;

/* Get the content of the text node and split it */
var locationList = textNodeAfterSpan.nodeValue.split(', ');

/* Reorder it */
var mainLocation = locationList[1];
locationList[1] = locationList[0];
locationList[0] = mainLocation;

/* Rewrite it */
textNodeAfterSpan.nodeValue = ' ' + locationList.join(', ');
```

```html
<li class="single-contact-location">
  <span>Location</span> 
  ALocation, BLocation, CLocation, DLocation, ELocation, FLocation
</li>
```
You can use `childNode` property to grab those fields and modify accordingly. Here is a fiddle <http://jsfiddle.net/sdvowy38/1/>

```
 var li = document.getElementsByClassName("single-contact-location");
 var arr=li[0].childNodes[2].textContent.trim().split(',');

```