Updated to handle fields that are an array of objects (e.g. Avinode segments)
Added test for fields that are an array of objects