I am new to Coding and I am doing a personal project and I got stuck in api filtering.My requirement is that the data should be rendered if the data in it equals to a specific word for eg:-known\_for\_department=="Directing" if this is true it should render the data in it.How could do it in reactjs.Can someone help me.

```js
{
            "adult": false,
            "gender": 2,
            "id": 1787802,
            "known_for_department": "Directing",
            "name": "Brian Avery Galligan",
            "original_name": "Brian Avery Galligan",
            "popularity": 0.63,
            "profile_path": null,
            "credit_id": "5fd051d968929c003bc48070",
            "department": "Directing",
            "job": "Second Unit First Assistant Director"
        },
        {
            "adult": false,
            "gender": 1,
            "id": 1774412,
            "known_for_department": "Production",
            "name": "Rachel O'Connor",
            "original_name": "Rachel O'Connor",
            "popularity": 0.6,
            "profile_path": null,
            "credit_id": "6124530a0f2fbd004815b6cb",
            "department": "Production",
            "job": "Executive Producer"
        },
```

this is the api data i have and from this i should filter if known\_for\_department==directing and if it is true i should render all the items in it the page.Can someone help me.Thanks in advance :)