Jquery autocomplete with multi dim json array
<p>I have developed comment box like facebook please check this URL <a href="http://jsfiddle.net/elankeeran/EHpA2/" rel="nofollow">http://jsfiddle.net/elankeeran/EHpA2/</a> autocomplete and textareagrow working fine. But my client asking to add #hash count as mention below</p>

<p><strong>Once you detect "#" sign, decorate the #hashtag with the count and highlight the #hashtag and tag count with red color.</strong></p>

<p>I am looking for output like as below</p>

<blockquote>
  <p>In 2012, @John Doe and @Jane Doe voted for #democratic (3) party candidate, @Barack Obama and @Arnold Schwarzenegger voted for #republican (2)  party candidate, @Mitt Romney.</p>
</blockquote>

<p><strong>my code</strong></p>

<pre><code>$.fn.autogrow = function (options) {
    $(this).each(function () {
        var $this = $(this),
            minHeight = $this.height(),
            lineHeight = $this.css('lineHeight');

        $(this).css('height', 'hidden');
        var duplicate = $('&lt;div&gt;&lt;/div&gt;').css({
            position: 'absolute',
            top: -10000,
            left: -10000,
            width: $(this).width(),
            fontSize: $this.css('fontSize'),
            fontFamily: $this.css('fontFamily'),
            lineHeight: $this.css('lineHeight'),
            resize: 'none',
                'word-wrap': 'break-word',
                'white-space': 'pre-wrap'
        }).appendTo(document.body);

        var update = function () {
            duplicate.html(this.value);
            $(this).css('height', Math.max(duplicate.height() + 20, minHeight));
        };

        $(this).change(update).keyup(update).keydown(update);
        update.apply(this);

    });

    return this;

}

$('textarea').autocompleteTrigger({
  triggerStart : '@',
  triggerEnd: '',
     minLength: 1,
  source: [
    "Barack Obama",
    "John Smith",
    "Jane Doe",
    "Arnold Schwarzenegger",
    "Mitt Romney"
  ]
}).autogrow();
</code></pre>
