title: Lodash groupby alphabet
body: <p>I'm working on an objects that contains some user details and I need to convert this object to another object to build a contact application. I'm using Lodash to deal with arrays and objects.</p>
  
  <pre><code>[
      {
        "id": 1,
        "first_name": "Alie",
        "last_name": "Stigger",
        "email": "astigger0@lulu.com",
        "gender": "Female",
        "avatar":
          "https://robohash.org/sintnihiladipisci.jpg?size=200x200&amp;set=set1",
        "phone_number": "617-845-6906"
      },
      {
        "id": 2,
        "first_name": "Kendall",
        "last_name": "Mayes",
        "email": "kmayes1@bbb.org",
        "gender": "Male",
        "avatar": "https://robohash.org/nemoetqui.jpg?size=200x200&amp;set=set1",
        "phone_number": "193-270-2893"
      },
      {
        "id": 3,
        "first_name": "Yolanthe",
        "last_name": "Maddaford",
        "email": "ymaddaford2@reference.com",
        "gender": "Female",
        "avatar":
          "https://robohash.org/exercitationemestaccusamus.jpg?size=200x200&amp;set=set1",
        "phone_number": "267-365-2165"
      }
  ]
  </code></pre>
  
  <p>Now all I want is to build another object from main one which contains alphabet letters based on last_name prop using Lodash.</p>
  
  <p>In this case:</p>
  
  <pre><code>[
      {
        letter: "S",
        contacts: [
          {
            id: 1,
            first_name: "Alie",
            last_name: "Stigger",
            email: "astigger0@lulu.com",
            gender: "Female",
            avatar:
              "https://robohash.org/sintnihiladipisci.jpg?size=200x200&amp;set=set1",
            phone_number: "617-845-6906"
          }
        ]
      },
      {
        letter: "M",
        contacts: [
          {
            id: 2,
            first_name: "Kendall",
            last_name: "Mayes",
            email: "kmayes1@bbb.org",
            gender: "Male",
            avatar: "https://robohash.org/nemoetqui.jpg?size=200x200&amp;set=set1",
            phone_number: "193-270-2893"
          },
          {
            id: 3,
            first_name: "Yolanthe",
            last_name: "Maddaford",
            email: "ymaddaford2@reference.com",
            gender: "Female",
            avatar:
              "https://robohash.org/exercitationemestaccusamus.jpg?size=200x200&amp;set=set1",
            phone_number: "267-365-2165"
          }
        ]
      }
    ]
  </code></pre>