I have an multidimensional array in my ruby which looks like this :
arr= [{"10.0.1.50", "4"},
{"10.0.1.51", "10"},
{"10.0.1.48", "7"}]
I want to sort it such that the result should be:
result= [{"10.0.1.51", "10"},
{"10.0.1.50", "4"},
{"10.0.1.48", "7"}]
I am basically sorting on the first column which is 10.0.1.X. So it is sorted based on X.