I'm attempting to simplify a complex structure.
After much simplification, I have managed to reduce it to the following:
[
{'Cells':{'Results':[
{'Key':'ID','Value':123},
{'Key':'Color','Value':'Red'},
{'Key':'Direction','Value':'West'}
]}},
{'Cells':{'Results':[
{'Key':'ID','Value':456},
{'Key':'Color','Value':'Green'},
{'Key':'Direction','Value':'East'}
]}}
]
My expertise in lodash is insufficient and I seek assistance in transforming the above into this format:
[
{'ID':123, 'Color':'Red', 'Direction':'West'},
{'ID':456, 'Color':'Green', 'Direction':'East'}
]
Note that the number of keys may differ for each object. Some objects may only include the ID, while others may have more than the three keys shown in the example.