If property is array (List) need to convert it to JSON
This commit is contained in:
parent
412a46d603
commit
734ab8abd1
|
@ -133,7 +133,7 @@ AbstractClass.whatTypeName = function (propName) {
|
|||
AbstractClass._forDB = function (data) {
|
||||
var res = {};
|
||||
Object.keys(data).forEach(function (propName) {
|
||||
if (this.whatTypeName(propName) === 'JSON') {
|
||||
if (this.whatTypeName(propName) === 'JSON' || data[propName] instanceof Array) {
|
||||
res[propName] = JSON.stringify(data[propName]);
|
||||
} else {
|
||||
res[propName] = data[propName];
|
||||
|
|
Loading…
Reference in New Issue