(input)
| 16 | } |
| 17 | |
| 18 | function getArrayObjectCandidates(input) { |
| 19 | const candidates = []; |
| 20 | if (Array.isArray(input) && input.every(isPlainObject)) { |
| 21 | candidates.push({ path: '$', rows: input }); |
| 22 | } else if (isPlainObject(input)) { |
| 23 | Object.keys(input).forEach((key) => { |
| 24 | const value = input[key]; |
| 25 | if (Array.isArray(value) && value.length && value.every(isPlainObject)) { |
| 26 | candidates.push({ path: '$.' + key, rows: value }); |
| 27 | } |
| 28 | }); |
| 29 | } |
| 30 | return candidates; |
| 31 | } |
| 32 | |
| 33 | function buildRowsFromObjects(rows) { |
| 34 | const columns = []; |
no test coverage detected