# How to filter keys of a dictionary without depwarn?

**URL:** <https://discourse.julialang.org/t/how-to-filter-keys-of-a-dictionary-without-depwarn/7711>\
**Category:** General Usage\
**Created:** [December 12, 2017, 3:43pm UTC](https://discourse.julialang.org/t/how-to-filter-keys-of-a-dictionary-without-depwarn/7711 "2017-12-12T15:43:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Post date:** [December 12, 2017, 3:43pm UTC](https://discourse.julialang.org/t/how-to-filter-keys-of-a-dictionary-without-depwarn/7711/1 "2017-12-12T15:43:16Z")

</div>

How to filter keys of a dictionary without depwarn?

```julia
julia> using Iterators; Iterators.filter(iseven, keys(Dict()))
WARNING: filter(flt, itr) is deprecated, use Iterators.filter(flt, itr) instead.

```

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [December 12, 2017, 4:07pm UTC](https://discourse.julialang.org/t/how-to-filter-keys-of-a-dictionary-without-depwarn/7711/2 "2017-12-12T16:07:44Z")

</div>

> [@jw3126](#):
>
> using Iterators; Iterators.filter(iseven, keys(Dict()))

Try

`using Base.Iterators`

---

<div class="post-metadata">

**Author:** ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Post date:** [December 12, 2017, 4:17pm UTC](https://discourse.julialang.org/t/how-to-filter-keys-of-a-dictionary-without-depwarn/7711/3 "2017-12-12T16:17:59Z")

</div>

Ah I see I was using the deprecated `Iterators.jl`. Thanks!
