(columns: Array<string>, row: Array<any>)
| 462 | }) |
| 463 | |
| 464 | function rowToObject(columns: Array<string>, row: Array<any>) { |
| 465 | const obj: Record<string, any> = {} |
| 466 | for (let i = 0; i < columns.length; i++) { |
| 467 | Rec.assignProperty(obj, columns[i], row[i]) |
| 468 | } |
| 469 | return obj |
| 470 | } |
| 471 | const extractObject = (rows: [Array<string>, Array<any>]) => rows[1].map((row) => rowToObject(rows[0], row)) |
| 472 | const extractRows = (rows: [Array<string>, Array<any>]) => rows[1] |
| 473 |