I have the following array of arguments that has a hash with the args keys and their relevant passed values:
args_array = [{:collection=>["abe", "<mus>", "hest"], :include_blank=>true, :required=>true}]
I need to filter this hash to just get only some keys (like :include_blank and :required) in this example, with their relevant values like so:
filtered_args_hash = {:include_blank=>true, :required=>true}
So the collection arg is excluded, and just the include_blank, and required in which I specified are the ones returned.
Update:
Here is a keys array of symbols in which I need to filter according to them:
filter_keys = %i(include_blank required)
How I can do that?