I am having the array of Dictionary and it's in the formats of,
resultsArray = {
id = 1;
name = test;
distance = 11.5;
id = 2;
name = test1;
distance = 0.5;
id = 3;
name = test2;
distance = 2.5;
id = 4;
name = test4;
distance = 1.5;
}
I want to sort the array using the distance key and my distance in the float type. So how can i sort the array using distance is in the ascending order?.
So i am expecting the results like this,
resultsArray = {
id = 2;
name = test1;
distance = 0.5;
id = 4;
name = test4;
distance = 1.5;
id = 3;
name = test2;
distance = 2.5;
id = 1;
name = test;
distance = 11.5;
}
Please help me out.
Thanks!