Check out example codes for "ruby hash pick". It will help you in understanding the concepts better.

Code Example 1

> { one: 1, two: 2, three: 3 }.slice(:one, :two)
=> {:one=>1, :two=>2}

Learn ReactJs, React Native from akashmittal.com