import itertools
import json

def read_iterables(iterables, index_name="inx"):
    for index, item in roundrobin(iterables):
        if item:
            d = json.loads(item.strip())
            d[index_name] = index
            yield d


def roundrobin(iterables):
    for list_ in itertools.zip_longest(*iterables):
        for item in enumerate(list_):
            yield item
