Closed blackwinter closed 1 year ago
Isn't this solvable with do list
? I can iterate over simple and repeated field.
Yes, there are several workarounds, depending on the use case. And it's still inconvenient and error-prone.
But: I opened this issue under the assumption that Metafix's behaviour was incompatible with Catmandu. Which it isn't.
In the presence of optionally repeated fields, there is no unified way of addressing a subfield.
field.subfield
only works iffield
is not repeated (i.e., is an object internally),field.*.subfield
only works iffield
is repeated (i.e., is an array internally).Alternatively, enable more/all functions to support the
field.subfield
syntax with repeated fields. E.g.,any_match()
does support it,exists()
doesn't.