#Sorting nasted objects MAt-sort Angular Material
20 messages · Page 1 of 1 (latest)
Also there is no "name" Involved here
What is item[property]?
I mean, whats the value of it ? As well as what's the value of item?
Is item a "PointGame"?
I think you want item.scoreResult.description
But it's hard to tell without knowing what item is.
Not sure what changes u made and what the code is looking like now.
Let's try again, what's item?
What does console.log(item) shows ?
You want to put it inside the accessor
The sortingDataAccessor.
Ok
So now based on the value of property, u want to change filtering?
What values can property be ?
So what would u expect to happen with the code u have when property is description? item[property].description?
That's going to Translate to item.description.description
Which is incorrect.
U need item['scorePoint'].description
Or item.scorePoint.description