Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (19 sloc) 415 Bytes
#set($all = {})
#set($order = [])
#foreach($d in $response.response.response)
#if(!$list.contains($order,$d.type))
#set($r = $order.add($d.type))
#set($r = $all.put($d.type, []))
#end
#set($li = $all.get($d.type))
#set($r = $li.add($d))
#end
#foreach($o in $order)
#set($li = $all.get($o))
#if($li.size() > 0)
=== $o ===
#end
#foreach($d in $li)
$d.textsuggest ($d.subtext, pop: $d.popularity) [$d.score]
#end
#end