# How to filter group channels by nickname and channel name

**URL:** <https://community.sendbird.com/t/how-to-filter-group-channels-by-nickname-and-channel-name/7639>\
**Category:** React Native\
**Tags:** group-channel\
**Created:** [June 20, 2023, 9:53pm UTC](https://community.sendbird.com/t/how-to-filter-group-channels-by-nickname-and-channel-name/7639 "2023-06-20T21:53:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![omedranoc](https://avatars.discourse-cdn.com/v4/letter/o/47e85d/32.png) [@omedranoc](https://community.sendbird.com/u/omedranoc)\
**Post date:** [June 20, 2023, 9:53pm UTC](https://community.sendbird.com/t/how-to-filter-group-channels-by-nickname-and-channel-name/7639/1 "2023-06-20T21:53:58Z")

</div>

**How to filter group channels by nickname and channel name ?**

I’m trying to filter the group channel list either by channel name or by nickname. For that I’m using the following code:

```auto
  const channelFilter = () => {
    const groupChannelFilter: GroupChannelFilter = new GroupChannelFilter();
    groupChannelFilter.nicknameContainsFilter = chatSearch;
    groupChannelFilter.channelNameContainsFilter = chatSearch;

    const params: GroupChannelCollectionParams = {
      filter: groupChannelFilter,
    };
    const query = sdk.groupChannel.createGroupChannelCollection(params);
    return query;
  };

```

when I use only "groupChannelFilter.nicknameContainsFilter = chatSearch; " effectively I filter the list of channels by nickname, the same thing happens when I only use groupChannelFilter.channelNameContainsFilter, the channels will be filtered by channel name. The problem is when I try to use both at the same time, neither of the two filters works correctly.

* * *

**UIKit Version**  
sendbird/chat: 4.6.1,  
sendbird/uikit-react-native: 2.4.1

**Reproduction Steps**  
Using the code above

---

<div class="post-metadata">

**Author:** ![uday.bhaskar](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/uday.bhaskar/32/3966_2.png) [@uday.bhaskar](https://community.sendbird.com/u/uday.bhaskar)\
**Post date:** [June 21, 2023, 5:04am UTC](https://community.sendbird.com/t/how-to-filter-group-channels-by-nickname-and-channel-name/7639/3 "2023-06-21T05:04:48Z")

</div>

Hello @omedranoc,

The `GroupChannelFilter()` considers the query type as `AND` so it searches for the channels with both `nicknameContainsFilter` and `channelNameContainsFilter` and returns the channel list.
