I have a hash here,
@property_hash = {
:code => '',
:fname => '',
:lname => '',
:basic_sal => '',
:emp_type => '',
}
and an array
line = [02,'Firstname', 'LastName', 5800, 'PL']
I want to map the array into the hash like
@property_hash = {
:code => 02,
:fname => 'Firstname',
:lname => 'LastName',
:basic_sal => 5800,
:emp_type => 'PL',
}
what is the best way to do this ?? Thank you
line's order is the same as@property_hash?