To clarify further....

I have two hashes..

data = JSON.parse(data)['info'] puts data

I get:

[
{
"title"=>"CEO",
"name"=>"George",
"columns"=>[
{
"display_name"=> "Salary",
"value"=>"3.85",
}
, {
"display_name"=> "Bonus",
"value"=>"994.19",
}
, {
"display_name"=> "Increment",
"value"=>"8.15",
}
]
}
]


data2 = JSON.parse(data2)['info']
puts data2

[
{
"title"=>"CEO",
"name"=>"George",
"columns"=>[
{
"display_name"=> "Address",
"value"=>"Albany",
}
, {
"display_name"=> "Phone",
"value"=>"47123",
}
, {
"display_name"=> "Mobile",
"value"=>"784123",
}
]
}
]

I want to join the values inside "columns" into one hash if the 
conditions are met like name = george in both hashes

the required output to be like

[
{
"title"=>"CEO",
"name"=>"George",
"columns"=>[
{
"display_name"=> "Salary",
"value"=>"3.85",
}
, {
"display_name"=> "Bonus",
"value"=>"994.19",
}
, {
"display_name"=> "Increment",
"value"=>"8.15",
}
, {
"display_name"=> "Address",
"value"=>"Albany",
}
, {
"display_name"=> "Phone",
"value"=>"47123",
}
, {
"display_name"=> "Mobile",
"value"=>"784123",
}
]
}
]

What I have tried is zip, merge, inject, join, but the best I can get is 
a new Hash that discards all first values and store second.

-- 
Posted via http://www.ruby-forum.com/.