I have an array of hashes:
[
{
:title=>"Working as a SSE",
:organisation=>{:id=>428, :name=>"google"},
:from=>"2018-6-1",
:to=>nil
}, {
:title=>"Concatenate two video files to single video in players",
:organisation=>{:id=>197, :name=>"UNFPA"},
:from=>"2014-1-1",
:to=>"2015-12-1"
}, {
:title=>"Highcharts Demo",
:organisation=>{:id=>6, :name=>"UNDFS"},
:from=>"2016-1-1",
:to=>"2017-6-1"
}, {
:title=>"Working as a Judicial Affairs",
:organisation=>{:id=>427, :name=>"swtp"},
:from=>"2017-1-1",
:to=>"2018-6-1"
}
]
I want to sort it in the following order:
- First sort is based on
to - Second sort is based on
from - Third sort is based on
organisation name - Finally, sort based on
title
Can anyone help me sort the array of hashes?
nilof:to=>nilgo? Please answer with edit.