I am new to TypeScript and I have the given object:
let obj = {hash: 'foo', filename: 'bar', blob_size: 'bas'};
And I would like to convert it into the following
{'foo': ['bar', 'bas']}
This was my first attempt:
[...obj.values()].map((v) => {v.hash: [v.filename, v.blob_size]}]
But that seems to be invalid in TS. In other languages I would have called it simply Array and Dictionary or Map. Could someone give me a hint how to convert the first to the second example? And also, what would be the corresponding type names? In both cases typeof just returns Object.