13 lines
262 B
Ruby
13 lines
262 B
Ruby
class Array
|
|
def stringify_keys_deep!
|
|
new_ar = []
|
|
self.each do |value|
|
|
new_value = value
|
|
if value.is_a? Hash or value.is_a? Array
|
|
new_value = value.stringify_keys_deep!
|
|
end
|
|
new_ar << new_value
|
|
end
|
|
new_ar
|
|
end
|
|
end |