I have a function that is looping over a bunch of items that each look something like this:
[
{"Target":"col-one","Value":0.261},
{"Target":"col-two","Value":0.881},
{"Target":"col-three","Value":0.571},
{"Target":"col-four","Value":0}
]
I would like to re-order each item so that instead of going in ascending order, it goes something like col-one, col-four, col-three, col-two. Is there a relatively simple method that can accomplish this type of arbitrary sorting?
To be clear, I want the result to look like the following:
[
{"Target":"col-one","Value":0.261},
{"Target":"col-four","Value":0},
{"Target":"col-three","Value":0.571},
{"Target":"col-two","Value":0.881}
]