I have an Object Parent having structure as below
public class Parent {
private Long id;
private List<Child> children;
}
I want to flatten the Parent object so the structure will be like:
public class Parent {
private Long id;
private Child children;
}
and the result would be List<Parent> which will accommodate all of the Children's as single object in Parent list.