Hello,
To resolve the issue with Device B missing, you will have to create 2 separate Data to Server collections with their own respective data inputs:
As for the formatting, could you please refer to this reply and see if this helps with the way the data is being retrieved? Flattening data - #6 by Matas
The entire scenario in the topic where the reply is is a little different, but when it comes to formatting, it should answer your question as well I believe.
Regards,
M.
