Is there a more elegant way to transform an array of key-value pairs into a list of objects in TypeScript?
let keys : string [] = ["name", "addr", "age"];
let values : string [][] = [["sam", "NY", "30"],["chris", "WY", "22"],["sue", "TX", "55"]];
The desired output:
[{"name": "sam", "addr": "NY", "age": "30"},
{"name": "chris", "addr": "WY", "age": "22"},
{"name": "sue", "addr": "TX", "age": "55"}]