new to es6 here. is there any way to shorten this code with es6 features? i'm trying to destructure from an object and put those pulled properties into a new object.
const { Height, Width, Location, MapAttachmentTypes,
ZoomLevelAdjustment, CustomPushPins, CenterPushpinStyle, ScaleFactor } = args;
const body = {
Height,
Width,
Location,
MapAttachmentTypes,
ZoomLevelAdjustment,
CustomPushPins,
CenterPushpinStyle,
ScaleFactor
};
I tried this, but it didn't work:
const body = { Height, Width, Location, MapAttachmentTypes, ZoomLevelAdjustment, CustomPushPins, CenterPushpinStyle, ScaleFactor } = args;