Let us say we have an object such as
var city = {shortName : 'NY', fullName : 'New York'}:
Now I want to create a new object where the key should be the value of shortName from the above object and the Value of this Key should be the Value of fullName from above object.
The structure should be like this.
var abc = { NY : 'New York'};
I am aware of the destruction concept but I cannot figure out how to achieve this.