We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a32242 commit 91c41b1Copy full SHA for 91c41b1
lib/contentstack/utils.rb
@@ -9,8 +9,7 @@ module Utils
9
# Simple way to turn a deeply nested hash into an openstruct
10
# https://coderwall.com/p/74rajw/convert-a-complex-nested-hash-to-an-object
11
def to_openstruct(hash)
12
- json = hash.to_json
13
- JSON.parse(json, object_class: OpenStruct)
+ JSON.parse(hash.to_json, object_class: OpenStruct)
14
end
15
16
0 commit comments