I’m receiving a JSON with several arrays: foo1, foo2, foo3, etc. with different numbers in the name. I’d like to have a single foo array that contains all of these. Is there an easy way to do this? Right now, I just have a class that contains optional foo1: Array, foo2: Array, etc and a method to convert it to another class with foo: Array, but I’d like to skip the conversion if possible.
Landry Norris
10/26/2022, 5:20 PM
Something like SerialName(foo*) would make sense to me, but I don’t know if there’s something built in.