Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const carsEntity: {[key: string]: Car} = {
- 'xyz': { id: 'xyz', name: 'Mazda' },
- 'abc': { id: 'abc', name: 'Porsche' }
- };
- const transformedEntity1 = Object.keys(carsEntity).map(carId => carsEntity[carId]);
- const transformedEntity2 = Object.values(carsEntity);
- const transformedEntity3 = Object.entries(carsEntity);
Add Comment
Please, Sign In to add comment