So i have a multidimensional array in ruby which looks like this
[["34224", "1"],["20561", "1"],["26195", "1"],["32098", "1"],
["33375", "1"],["34077", "1"],["34219", "1"],["34220", "1"],
["34223", "1"],["19178", "1"],["33650", "1"],["33654", "1"],
["33715", "1"],["33716", "1"],["33966", "1"],["33967", "1"],
["33968", "1"],["34068", "1"],["34069", "1"],["34070", "1"],
["34071", "1"],["34072", "1"],["34073", "1"],["34074", "1"],
["34075", "1"],["34076", "1"],["33515", "2"],["33717", "2"],
["33852", "2"],["33965", "2"],["34222", "2"]]
Basically, the second value in each array is the count.
I wiant to get all the values in the array where the count is 1 and where the count is 2. I want to be able to sort them apart.
How do i do tht in the cleanest ruby way possible
Matrixfrom the standard library), what you have is an array whose elements are arrays but a multi-dimensional array is quite a different beast.