Check out example codes for "swift filter dictionary". It will help you in understanding the concepts better.

Code Example 1

let data = ["a": 0, "b": 42]
let filtered = data.filter { $0.value > 10 }
print(filtered) // ["b": 42]

Learn ReactJs, React Native from akashmittal.com