Here is the scenario:
$scope.book1 = {
a = 1,
b = 2
}
This is the information retrieved from the database:
$scope.book2 = {
title = 2,
author = 'joe'
}
What steps should I take to merge the data in book2 into book1, ensuring that all four fields are included?
I would like to note that our users primarily use IE9 and above. If feasible, I am interested in using lodash for this task; however, I need the updated data to be reflected in the original book1 object instead of creating a new one.