Jan 30, 2023 3:57 AM - edited Jan 30, 2023 4:01 AM
I have a blog listing page which features all my blog posts. Each blog post is basically a team member. The title of the blog post is the name of the team member.
What I want is that on the blog listing page, I sort the list of all blog posts based on their surname.
Previously I was doing something like this:
contents|sort(false, false, "name")
Now I want it to be something like this:
contents|sort(false, false, "name.split(' ')")
So for instance, I have two names:
Jon Snow, Cersie Lannister
The sorted order should be:
Cersie Lannister, Jon Snow
As L appears before S in the alphabet.
How can this be achieved?
Jan 30, 2023 4:08 AM
@Jaycee_Lewis would appreciate it if you could help in regards to this. Thanks!