import { List, Record } from 'immutable'; interface IUser { id: number; name: string; } const UserRecord = RecordIn this example, we first define an interface and Record type to represent our User object. We then create a List of two UserRecords and use the map method to create a new List with only the user names. This new List is assigned to the userNames variable, which is then logged to the console. The immutable List map method is provided by the immutable.js library.({ id: 0, name: '', }); const users = List([UserRecord({ id: 1, name: 'John' }), UserRecord({ id: 2, name: 'Jane' })]); const userNames = users.map((user) => user.name); console.log(userNames); // List ['John', 'Jane']