oneway itinerary: A flight with one leg
combo: A flight with two or more legs
hash: It is a key computed at frontend to identify matching itineraries <departure time + arrival time + flight number>
Previously we used to have oneway itineraries for return flight.
Now in domestic return flights we get both oneway and return(we call combo) itineraries.
If the current leg result is oneway itinerary
If current leg is a combo
If we do not have any selected results, we push the result to selected items.
If we have a selection, there're two cases: