Ever been frustrated when your input CSV file isn’t ordered, and you want to use it as it is without manually modifying it? A better way ; you can leverage toSortedList and flatMap operators to process your raw input directly .
just used this snippet to inspect my channel
output :
Use toSortedList to sort the raw input dynamically based on your desired key(s).
Follow it up with flatMap to transform the sorted data into a flat, streamlined structure for further processing.
result: sorted csv