mongodb - How to store dynamic fields in Mongo DB -
I'm new to mangodibi, but looking at this problem to solve it:
My application is a dynamic form builder which lets users add dynamic fields to the form. Any field on the form is OK or not stable
Users can add any number and fields of any kind such as text fields, dropdowns, or date fields on the form and save the form.
I believe that one of its dynamic storage and fields are not stable, Oracle does not work for DB storage. Is Monggo DB can be used for such storage Can I get more data?
How the data is stored in Mongo DB and the form is brought to display.
Thanks in advance!
MongodiB is a document based database that you have stated that there is no column or field restriction. You can put your dynamic field in an object and save it in the same collection.
For example
person: {name: "", contact: [contact1, contact2]} You can also add more fields for example
person: {name: "", contact: [], email: ''} < / Pre> You can now save it to that person archive just use the JavaScript object and add a new key and value and save it. When you are brought to them, you can iterate over the keys on the object and show values back to the front
(for var in person) {// do something with key}
Comments
Post a Comment