Wouldn't the query for your example just be
data.filter(d => d.friends.includes("John")).map(d => ({name: d.name+" "+d.lastName}))
Maybe I'm missing the bigger picture, but that doesn't seem so bad
data.filter(d => d.friends.includes("John")).map(d => ({name: d.name+" "+d.lastName}))
Maybe I'm missing the bigger picture, but that doesn't seem so bad
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...