I have the following:
$scope.book1 = {
a = 1,
b = 2
}
I'm getting this from my database:
$scope.book2 = {
title = 2,
author = 'joe'
}
How can I update the book1 object with the data from book2 so that it has all four fields?
Note that my users are using IE9 and above. If it's possible I would like to use lodash but I'm not sure that's possible as I want the result to go into the book1 object and not to create a new object.