10 lines
No EOL
219 B
TypeScript
10 lines
No EOL
219 B
TypeScript
export default abstract class ArrayUtility {
|
|
public static ToIdKeyedDict(array: Array<any>) {
|
|
const dict: { [key: string]: any } = {};
|
|
for (const item of array) {
|
|
dict[item.Id] = item;
|
|
}
|
|
|
|
return dict;
|
|
}
|
|
} |