Added create_items function to handle dict. array.