I have a column in my antd table called Specialities. The data(**specialities**) in that column is coming from back end as an array collection.
What I tried to do is
{
title: 'Specialties',
dataIndex: 'specialties',
key: 'specialties',
sorter: (a, b) => a.specialties.localeCompare(b.specialties),
render: (val, record)=><div title={val} className="text_overlap">{val.map((a)=>a.name).toString()}</div>
}
I get this error while doing this
TypeError: a.specialties.localeCompare is not a function
How can I sort this column where data is coming from an array collection?

