analytics.js
function convert(traits) {
  var arr = [];
  each(traits, function(key, value) {
    arr.push({ name: key, value: value });
  });
  return arr;
}
function convert(traits) {
  var arr = [];
  each(traits, function(key, value) {
    arr.push({ name: key, value: value });
  });
  return arr;
}
function convert ( traits ) { var arr = [ ] ; each ( traits , function ( key , value ) { arr . push ( { name : key , value : value } ) ; } ) ; return arr ; }
Convert a traits object into the format LiveChat requires.

@param {Object} traits
@return {Array}
Convert a traits object into the format LiveChat requires .