Initial Array
{
"Golf > Short game > Ballflight / Target",
"Mental > I do (behavior/skills - how) > Energy / Emotions",
"Fitness > Endurance",
"Fitness > Flexibility",
"Golf > Long game",
"Golf > Long game > Approach from fairway",
"Golf > Practice Game",
}
I want to sort the above array as starting from golf
, fitness
and mental
.
so Resulting array is like as below
{
"Golf > Short game > Ballflight / Target",
"Golf > Long game",
"Golf > Long game > Approach from fairway",
"Golf > Practice Game",
"Fitness > Endurance",
"Fitness > Flexibility",
"Mental > I do (behavior/skills - how) > Energy / Emotions",
}
Please guide me.
I have try using for loop but i want some simple solution to parse it.
Thanks .