lib/cmsObjConverter.js
function cleanUpModel(bbDocumentModel) {
    var x;
    for (x in bbDocumentModel) {
        if (Object.keys(bbDocumentModel[x]).length === 0) {
            delete bbDocumentModel[x];
        }
    }
    var data = bbDocumentModel.data;
    for (x in data) {
        if (Object.keys(data[x]).length === 0) {
            delete data[x];
        }
    }
}
function cleanUpModel(bbDocumentModel) {
    var x;
    for (x in bbDocumentModel) {
        if (Object.keys(bbDocumentModel[x]).length === 0) {
            delete bbDocumentModel[x];
        }
    }
    var data = bbDocumentModel.data;
    for (x in data) {
        if (Object.keys(data[x]).length === 0) {
            delete data[x];
        }
    }
}
function cleanUpModel ( bbDocumentModel ) { var x ; for ( x in bbDocumentModel ) { if ( Object . keys ( bbDocumentModel [ x ] ) . length === 0 ) { delete bbDocumentModel [ x ] ; } } var data = bbDocumentModel . data ; for ( x in data ) { if ( Object . keys ( data [ x ] ) . length === 0 ) { delete data [ x ] ; } } }
Intermediate JSON is the initially converted JSON model from raw data, convert model based on
Intermediate JSON is the initially converted JSON model from raw data convert model based on