@register.filter
def array_lookup(array, index):
    if index < len(array):
        return array[index]
Get an item from an array.
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/reports/templatetags/report_tags.py/array_lookup