turn object into map in struct2map