7
Hello, I have the following object array:
[
{
"id": 97,
"name": "Jon",
"technologies": [
{
"id": 6,
"name": "React"
},
{
"id": 7,
"name": "Messageria"
}
]
},
{
"id": 98,
"name": "Doe",
"technologies": [
{
"id": 2,
"name": "Javascript"
},
{
"id": 6,
"name": "React"
}
]
},
{
"id": 99,
"name": "Mark",
"technologies": [
{
"id": 8,
"name": "PHP"
},
{
"id": 9,
"name": "Laravel"
}
]
}
]
How could I filter this object and return only the developers that have, for example, the technology with id 6. The return I need are only the developers who have relationship with the technology id 6, however, I need to also appear the other Technologies linked to the Veloper.
I know that through the find method, it is possible to do this, but I do not know how to implement.
const result = developers.find(dev => dev.technologies ?);
What would be the right way?
Good, I forgot the
some
:-)– hkotsubo