* Extracts rows from an array of arrays, using the provided paths. */
($json, array $paths)
| 193 | * Extracts rows from an array of arrays, using the provided paths. |
| 194 | */ |
| 195 | private function extractRowsFromArray($json, array $paths): array { |
| 196 | $data = []; |
| 197 | if (is_array($json) && is_array(reset($json))) { |
| 198 | foreach ($json as $rowArray) { |
| 199 | $data[] = $this->extractRow($rowArray, $paths); |
| 200 | } |
| 201 | } else { |
| 202 | $data[] = $this->extractRow($json, $paths); |
| 203 | } |
| 204 | return $data; |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * Extracts a single row's values based on the given paths. |
no test coverage detected