nl_tokens: Parse one record associations for JSON format to change association model object to association model id
pl_tokens: function parseRecord ( req , res , record ) { for ( var associationName in res . locals . Model . associations ) { if ( ! record [ associationName ] ) { if ( record . dataValues [ associationName + 'Id' ] ) { record . dataValues [ associationName ] = <mask> [ associationName + 'Id' ] ; } } else { if ( record . dataValues [ associationName + 'Id' ] ) { record . dataValues [ associationName ] = record [ associationName + 'Id' ] ; } else if ( isObject ( record [ associationName ] && record [ associationName ] . id ) ) { record . dataValues [ associationName ] = record [ associationName ] . id ; // if is a NxN association } else if ( req . we . utils . isNNAssoc ( record [ associationName ] ) ) { record . dataValues [ associationName ] = record [ associationName ] . id ; } else { for ( var i = record . dataValues [ associationName ] . length - 1 ; i >= 0 ; i -- ) { record . dataValues [ associationName ] [ i ] = record . dataValues [ associationName ] [ i ] . id ; } } } } return record ; }