Hello -
It seems that you are managing service with return data.
Let's change the format of the returned data.
You return an object with the data element that contains an array of other objects. In this case, in the mapping you do not mapped data anywhere. That is, for mapping mechanism, you do not create a bypass function of the array, but in the same time you are describing mapping attached to the array of the elements.
From the viewpoint of mapping such structure is not acceptable.
Programmatically there is no good way to solve such situation. Perhaps we should think about validation of such situations, but this is a very difficult task.
The solution lies in the power of your service: make sure that your service would return the data as an object, not an array. As an object with three fields. So it will be more logical and mapping can handle such a structure.