def setProps(properties, props, initialIndex=0):
    """
    Transform key, value from properties into props list items in the format
    expected by the HTTP POST request
    """
    i = initialIndex
    for key, val in properties.items():
        props['propertyId[%s]' % i] = key
        if hasattr(val, '__iter__'):
            j = 0
            props['propertyValue[%s]' % i] = val
        else:
            props['propertyValue[%s]' % i] = val
        i += 1
