I am trying to create a element_id-value pair and then dump that data into a file. Please help me out to create a function to create element_id-value using for loop.