use lodash.merge instead of $.extend, jquery isn't present in the server