First of all, your specific objects are incorrect. Objects should be written as name:value pairs, separated by a colon (and not an equal sign). In addition, you must use comma delimiters to delimit the properties of an object, for example:
var person = { firstName: "Matthias", lastName: "Eckhart", eyeColor: "blue" };
To extend an object with various properties through lodash , you can use _.assign(object, [sources], [customizer], [thisArg]) :
var a = { name: "value", name2: "value2" }; var b = { name3: "value", name4: "value2" }; _.assign(a, b);
<script src="https://raw.githubusercontent.com/lodash/lodash/3.10.1/lodash.min.js"></script>
source share