Background: I have built an API in Rails and a client in Angular. My API will connect to a third party API and grab some data. This data will come in as an nested object/hash which is stored in MongoDB/Mongoid.
When my Angular clients manipulates the data and send it to my API to save it, all empty arrays within the nested hash/object are replaced with null.
Is there a way I could avoid this from happening (other than manually converting all the nulls back to array but that would be tedious and complex as I'd need to push this updated data to the third part API also)?
try
or