danielsdeleo / deep_merge

Recursive Merging for Ruby Hashes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deep Merge non arrays

stevendelarwelle opened this issue · comments

Is it possible to deep merge this
{:available=>{:inventory=>{:sordernum=>849836}}}
{:available=>{:inventory=>{:sordernum=>221836}}}

to produce
{:available=>{:inventory=>[{:sordernum=>849836},{:sordernum=>221836}]}}

No, there's no option for that from what I can tell. We'd need a new option, so this is an enhancement request. That being said, I'm not sure exactly how it would know when to make something into an Array or not.