Assign dynamyc properties' names and data for object
$ npm install structured-object
Assign fields' names and values for object properties.
Then you can pass JSON object to
.serialize() method and get object with replaced properties' names and data.
Properties with value
null will be replaced with data from fields.
var StructuredObject = StructuredObject;var struct = ;struct;struct;struct;
It's posiible to pass an object with some identical properties. All of them will be replaced. If value is not assigned, it remains unchanged in serialized object.
It's able to get assigned fields.
If there is no required field in the StructuredObject,
.getField() returns an empty field with the same name.
If you call
.serialize() method with the object which has the adjacent properties with the same StructuredObject field
names, the serialized object will get the last enumerable one.