Question: ```
type = [('name1', 'value1'), ('name2', 'value2'), ('name3', 'value')]

```

want to pass above list through url as queryparams. Can not parse it for searching. It returns as string.

```
def get_queryset(self):
    queryset = super().get_queryset()
    search = self.request.GET.get('type')
    # need to convert search as list of tuple

```

Answer: 
Since `users` is an array, Pass the array to `setUsers`.
Use destructuring to for readability and simplification.

```
const [users, setUsers] = useState([]);
useEffect(() => {
  axios.get("http://localhost:5000/users").then((res) => {
    if (res.data.length > 0) {
      console.log(res.data);
      setUsers(res.data.map(({ username }) => username));
    }
  });
}, []);

```
res.data is an array.
to just set username from response you can try

```
setUsers(user => [...user, res.data.map(response => response.username)]); 

```