GJax89
December 2, 2021, 3:00pm
1
Hi All, I have a list where the indexes each contain a string of numbers separated by commas. I cant find a way to organize this in a way I want.
As an example, I’ll have something like:
(1): 22,10,37
(2):1, 17, 12, etc.
Is there a way to get the results as:
10,22,37 without changing the index?
I feel like there is an obvious solution to this that I’m just missing. . .
Edit: Small image of item in list:
Hi @GJax89 - Have you tried using List.Sort ? It should naturally work
1 Like
so great and so many ways
1 Like
GJax89
December 2, 2021, 3:07pm
4
I did give that a shot, but my issue is its not a list of lists, its a list of strings. So my full index is:
1,2,3
not:
1
2
3
I don’t know if that changes anything, but list.sort wasn’t getting me where I wanted to be.
GJax89
December 2, 2021, 3:09pm
5
I have not tried sort by key, but again this is showing data in a way I don’t have the data. Apologies if my stated example was unclear. Ill try and add some images to the example.
Can you please post a screenshot of what data you are using ? Easier to solve that way!
GJax89
December 2, 2021, 3:26pm
8
If you could flatten the output from code block to a single index that would be what I’m working with for the input
You need to convert your strings to lists. You can’t sort a single object.
Make sure you’re using natural sort or else your numbers will be off. GeniusLoci has one and I think Orchid has one as well.
5 Likes
sovitek
December 2, 2021, 3:29pm
10
aaha thats the question…nice spot Nick
1 Like
GJax89
December 2, 2021, 3:30pm
11
Thank you Nick! this is exactly what I was looking for. I knew there was a solution I was just to thick to see it!
@solamour and @sovitek thank you both for trying, I think I just wasn’t explaining what I was trying to do properly.
1 Like
All good… glad you got the answer you needed in the end!
2 Likes