appending to DOM using native js, need to write conditional that will append according to number of keys in object/ subobject/ etc