I think you want, map = literal == map ? map : { 'jake': 23 };