Can we apply grouping only for children tasks while retaining parent child relation

Here grouping will repeat like above example;
{ “id”: 1, “text”: “Parent 1”, “start_date”: “02-04-2017 00:00”, “duration”: 1, “parent”: null},
{ “id”: 2, “text”: “Child 1”, “start_date”: “02-04-2017 00:00”, “duration”: 2, “parent”: “1”, “priority”:“High”},
{ “id”: 3, “text”: “Child 2”, “start_date”: “11-04-2017 00:00”, “duration”: 2, “parent”: “1”,“priority”:“High” },
{ “id”: 4, “text”: “Child 3”, “start_date”: “13-04-2017 00:00”, “duration”: 2, “parent”: “1”, “priority”:“Low”},
{ “id”: 5, “text”: “Child 4”, “start_date”: “03-04-2017 00:00”, “duration”: 2, “parent”: “1”, “priority”:“Low”},
{ “id”: 6, “text”: “Parent 2”, “start_date”: “13-04-2017 00:00”, “duration”: 2, “parent”: null},
{ “id”: 7, “text”: “Child 5”, “start_date”: “12-04-2017 00:00”, “duration”: 2, “parent”: “6”,“priority”:“High”},
{ “id”: 8, “text”: “Child 6”, “start_date”: “14-04-2017 00:00”, “duration”: 2, “parent”: “6”, “priority”:“High”},
{ “id”: 9, “text”: “Child 7”, “start_date”: “21-04-2017 00:00”, “duration”: 2, “parent”: “6”,“priority”:“Low”},
{ “id”: 10, “text”: “Child 8”, “start_date”: “27-04-2017 00:00”, “duration”: 2, “parent”: “6”,“priority”:“Low”},

If you want to save the tree structure when grouping tasks, you need to enable the save_tree_structure parameter in the group function:

You can check how it works in the following sample:

The tasks with the project type are not displayed in the group mode.
You need to manually convert these tasks to the task type before grouping them, then you need to revert the changes.
Here is an example of how it can be implemented:

Not about save tree structure,
in the above example “Parent 1” task has four child tasks “child 1 to child 4”,
and “Parent 2” task has four child tasks “child 5 to child 8” which have priority “High” or “Low”, i want to group children tasks based on priority like above picture where children tasks reside under parent tasks and grouping is done for child tasks only

Thank you for the clarification.
There is no built-in way to do that.
When Gantt groups tasks, it checks the task property. If the task properties have the same value, they will be located in the same group.
Also, the group tasks are always displayed on the top level. So, you cannot Display the Parent 1 and Parent 2 tasks on the top level and the group tasks below them.

You will need to implement a custom solution by using the Gantt API and Javascript and generate the list of groups depending on the task properties.
Here is an example of how it can be implemented:

As you can see in the snippet, the Parent 1 and Parent 2 tasks in the group mode are not the same tasks. They only look that way. So, all the changes you apply to these tasks won’t be reflected on actual tasks. Dragging the child tasks to other dates will affect the dates of the original parent tasks, but that is only because project tasks ignore the date parameters and always depend on the dates of their children.