I believe hashes are not ordered so there is no such thing as the 1st
key. You can use profile.each_pair to iterate through the keys, but
which one you get first is not guaranteed.
So to answer the OPs question, how to show the first pair from each
hash together, he could do
<%= profile.keys[0] profile[ profile.keys[0] ] post.keys[0] post[
post.keys[0] ] %>
obviously with some tidying up. Though I am not sure that is actually
what he wants to do. Also if he is not using ruby 1.9 he may not get
the results he expects.
Actually there is some attributes common to both the hashes, using that
common attribute, i'm displaying the results. It works for me. Thank you
very much for your help.