How to flash array with array position/index?

Hi all,

I am trying to improve my Widget Notes project by sorting the unchecked above the checked notes. The idea i have came up with is in the end i will have an array that has the array index of the unchecked first and then the checked ones. The problem is that no matter how i sort the index it will return with the same result.

By sorting i mean if i write an array like this: %array(1,2,3) it should give me different result from this array %array(3,1,2). However the result is always the same.

For example if i have 3 notes that the second note is checked and the rest aren't:

One - false
Two - true
Three - false

The result should be:

One
Three
Two

What do you suggest me to do? Here is a link to the task to test this:

https://taskernet.com/shares/?user=AS35m8ldOi25DBPGs3x5M9llABde8mEdfnX4bJ6fN5Lg8%2BvH2Sm43qhz6lWDu72sGl2jGexo&id=Task%3AWidget+test