Last active
October 19, 2023 09:20
-
-
Save rafapolo/c6aeec0b2928260f41200357198c79d6 to your computer and use it in GitHub Desktop.
theoretical merge in between YAMLs to avoid redundant data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yaml' | |
# Load the base YAML file | |
base_data = YAML.load(File.read('config.yml')) | |
# Load the new data from a separate YAML file | |
version7_data = YAML.load(File.read('new_data.yml')) | |
# Merge the original data with the new data, overwriting the specified keys | |
actual_data = base_data.merge(version7_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment