Disney+ Hotstar interview question

Implement pluck method like underscore library