Last active
September 13, 2021 12:15
-
-
Save fatuk/d847d3af319379a51df1805899ab23b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const data = [ | |
{id: 1, name: 'John', surname: 'Doe', age: 34}, | |
{id: 2, name: 'John', surname: 'Doe', age: 33}, | |
{id: 3, name: 'John', surname: 'Doe', age: 35}, | |
{id: 4, name: 'Mike', surname: 'Doe', age: 35}, | |
]; | |
const ids = query( | |
where({name: 'John'}), | |
where({surname :'Doe'}), | |
order('age'), | |
)(data).map((u) => u.id); | |
console.log(ids); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment