working version of converting xml to json and placing the data into arrays