(value map[string]any)
| 192 | } |
| 193 | |
| 194 | func primaryRowsOneLevelDown(value map[string]any) ([]any, []string, bool) { |
| 195 | var matchedRows []any |
| 196 | var matchedPath []string |
| 197 | for key, raw := range value { |
| 198 | child, ok := raw.(map[string]any) |
| 199 | if !ok { |
| 200 | continue |
| 201 | } |
| 202 | rows, path, ok := primaryRowsAtCurrentLevel(child) |
| 203 | if !ok { |
| 204 | continue |
| 205 | } |
| 206 | if matchedPath != nil { |
| 207 | return nil, nil, false |
| 208 | } |
| 209 | matchedRows = rows |
| 210 | matchedPath = append([]string{key}, path...) |
| 211 | } |
| 212 | if matchedPath == nil { |
| 213 | return nil, nil, false |
| 214 | } |
| 215 | return matchedRows, matchedPath, true |
| 216 | } |
| 217 | |
| 218 | func metadataWithoutPath(value map[string]any, path []string) map[string]any { |
| 219 | metadata := make(map[string]any, len(value)) |
no test coverage detected