0

I would like to get an object property but as a different name

This works for the same name: const { propertyName } = object

but I would like to use const { propertyName as newPropertyName } = object

This doesn't work, is this another way to do it? I've seen javascript imports work this way.

Renato Gama
  • 16,431
  • 12
  • 58
  • 92
Kevin Danikowski
  • 4,620
  • 6
  • 41
  • 75

0 Answers0