I have two objects:
deviceConfigInfo
and deviceStatusInfo
Both contain an array of devices
(so theres a third device
object actually).
For each device
returned in deviceConfigInfo
there are these properties:
uuid
name
somethingElse
lookAnotherOne
and for deviceStatusInfo
uuid
name
somethingElse
someStatusInfo
someMoreStuff
(If you hadn't guessed, I just made up some random properties)
So back to that third object I mentioned, device
, I created it with all the properties combined. Now, my question is, say the deviceStatusInfo
gets updated, how can I update the device
object without losing the "old" data that isn't overwritten (in this case, the lookAnotherOne
property).
Does it have to be a manual process of getting the device with the matching uuid
and then updating each of the properties for deviceStatusInfo
or is there a quicker way of doing this? Imagine there were loads of properties.
Hopefully this makes sense. If it helps, I am using Mantle to create the objects/models.