Hi there.
I have a yaml file like this:
first_name: “paul”
age: 23
first_name: “peter”
age: 26
first_name: “luc”
age: 40
I load my yaml file in a variable called data:
data = YAML.load_file(“my_file.yaml”)
I only get the first register.
I would like to get the whole file in a array like that:
[{“first_name”=>“paul”,“age”=> 23},{“first_name”=>“pierre”,“age”=> 26},
{“first_name”=>“luc”",“age”=> 40}]
How can i do that
Thank you for your help.