I have following array, my objective is sort the array based on address._id field of each object, I tried lodash orderby function but didnt get desired result.
[{
rider_ids: '5b7116ea3dead9870b828a1a',
is_dropoff: false,
address: {
type: 'home',
city: 'Greater Noida',
_id: '5b6d62524b4dc03c478ec129'
}
},
{
rider_ids: '5b7116ea3dead9870b828a1a',
is_dropoff: true,
address: {
type: 'school',
city: 'Noida',
_id: '5b76d0631af1adaeabb44100'
}
},
{
rider_ids: '5b7116ea3dead9870b828a3w',
is_dropoff: true,
address: {
type: 'school',
city: 'Noida',
_id: '5b76d0631af1adaeabb44188'
}
},
{
rider_ids: '5b7116ea3dead9870b828a8a',
is_dropoff: true,
address: {
type: 'school',
city: 'Noida',
_id: '5b76d0631af1adaeabb44122'
}
}
]