I am so sorry for the confusion! It turns out, the way I present my data structure is wrong in my origial question. It should looks like

User
-name
-email
-working experience (list of a thing)
*job title
*salary

Users have multiple “working experience”(list of a thing), which contains fields “job title” and “salary”.

My question is how to sort the whole list by “job title” or “salary”. The solution you provide only works for sorting by “name” or “email”. Thank you!