0
I possess the following return:
[{"eh5g4vs84ah84gsdf4a8va"=>"information"}]
Is a hash
within a array
. I’d like to know how I take that Hash
from within the array
?
He’s the return of a consultation like this:
Promotions.no_tab_fields(organization.id, product.class).map do |custom_field|
campo = { custom_field.hash_field => product.custom_columns[custom_field.hash_field] }
end
My question is to get inside the array.
I’ve tried to:
- to_h
- Hash(field) //field is the array that has the hash inside
Thank you very much. ^^
– Lougans de Matos