question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there any possibility to do deep orderby?

See original GitHub issue

Is there any possibility to do deep orderby? const data = [{ id: 3, userId: 2, title: "delectus aut autem", metadata: {field1: 'bb', field2: 'btest'} }, { id: 2, userId: 1, title: "lorem ipsum", metadata: {field1: 'aa', field2: 'atest'} }]; orderBy(data, "metadata.field1", "ASC");

Its a awesome library, which reduces most of my time and code. 👍 Thank you in advance!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
aykutkardascommented, May 9, 2020

@aykutkardas Thank you so much!

Seems to be working, but getting error on 4th parameter, sample in link below.

https://stackblitz.com/edit/typescript-cjkpns?file=index.ts

I did solved. v.1.8.26

I’m glad this package is useful for you.

1reaction
aykutkardascommented, May 8, 2020

In fact, this is possible and a good request.

I will handle this as soon as possible. @sivaecekrr

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to sort array of objects with deep nested properties using ...
So that the expected result would be a sorted array based on deep values. const data = _.orderBy(array_of_objects, ['type.id','name.entry'] ...
Read more >
Lodash _.orderBy() Method - GeeksforGeeks
The _.orderBy() method is similar to _.sortBy() method except that it allows the sort orders of the iterates to sort by. If orders...
Read more >
How ORDER BY and NULL Work Together in SQL
Learn how NULLs are sorted by the ORDER BY clause in different databases and how to change the default behavior.
Read more >
sort by multiple nested fields · Issue #581 · lodash ... - GitHub
Unfortunately, this doesn't work and the array remains sorted in its original form. This would work if the fields weren't nested inside the ......
Read more >
How to Use sorted() and sort() in Python - Real Python
In this step-by-step tutorial, you'll learn how to sort in Python. You'll know how to sort various types of data in different data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found