Hello.
For example, there is an array
['Маша','Паша','Даша'] and an array of objects
[{id :1, name : 'Даша'},{id :2, name : 'Маша'},{id :3, name : 'Паша'}]. Ie, in each object of the array there is a property name with a value that is 100% in a regular array of strings.
It is necessary to sort the objects in the array by the name property so that they would be in the same order as the names in the regular array of strings, this is how it should be output:
[{id :2, name : 'Маша'}, {id :3, name : 'Паша'}, {id :1, name : 'Даша'}] Thank you in advance.