<commit_before>var multiView = function (truckObj,property,titleText,imageUrl) {

  var buttonArr = [];

  for (var i = 0; i < farr.length; i++) {
    if(truckObj[i][property]) {
      var button = {
        "type" : "postback",
        "title": farr[i][property],
        "payload": farr[i]._id
      }
      buttonArr.push(Object.assign({},button));
    }

  }

  var messageData = {
        "attachment": {
            "type": "template",
            "payload": {
                "template_type": "generic",
                "elements": [{
                    "title": titleText,
                    "subtitle": "Click on one",
                    "image_url": imageUrl,
                    "buttons": buttonArr
                }],

            }
        }
    }

    return messageData;

}

module.exports = multiView;
<commit_msg>Modify Click Flow<commit_after>var multiView = function (truckObj,property,titleText,imageUrl) {

  var buttonArr = [];

  for (var i = 0; i < truckObj.length; i++) {
    if(truckObj[i][property]) {
      var button = {
        "type" : "postback",
        "title": truckObj[i][property],
        "payload": truckObj[i]._id
      }
      buttonArr.push(Object.assign({},button));
    }

  }

  var messageData = {
        "attachment": {
            "type": "template",
            "payload": {
                "template_type": "generic",
                "elements": [{
                    "title": titleText,
                    "subtitle": "Click on one",
                    "image_url": imageUrl,
                    "buttons": buttonArr
                }],

            }
        }
    }

    return messageData;

}

module.exports = multiView;

{'fraction_non_alphanumeric': 0.14370546318289787, 'fraction_numerical': 0.0011876484560570072, 'mean_word_length': 1.541478129713424, 'pattern_counts': {'":': 22, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7210773', 'n_tokens_mistral': 512, 'n_tokens_neox': 483, 'n_words': 94}