How to store user defined schema and save data based on that schema

@slava thanks a lot for the response. after schema1 and schema2 is defined from the UI, how do i save it in the database before i fetch it? I tried to save it as Object Data type, but it doesnt work. each schema is for a different collection, so user can upload data into each collection based on the defined schema.