objA = {
"D": {"title": "D", "val": 1, "unit": "bar"},
"C": {"title": "C", "val": 1, "unit": "bar"},
"B": {"title": "B", "val": 1, "unit": "bar"},
"Group A": {"title": "A"
"upper right earth pressure": {"title": "upper right earth pressure", "val": 1, "unit": "bar"},
"lower right earth pressure": {"title": "right lower earth pressure", "val": 1, "unit": "bar"},
"upper earth pressure": {"title": "upper earth pressure", "val": 1, "unit": "bar"},
"upper left earth pressure": "val": 1, "unit": "bar"},
"lower left earth pressure": {"title": "lower left earth pressure", "val": 1, "unit": "bar"}
};
objB = {
"D": 0,
"C": 0,
"B": 0,
"A": 0,
"right upper earth pressure": 0,
"right lower earth pressure": 0,
"upper right earth pressure": 0,
"left upper earth pressure": 0,
"left lower earth pressure": 0
};
how to use the es6 method to assign the value of the latter to the val? of the former
the real data structure is more complicated than this.