When you post code or sample data or console output please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance
Please got back and edit both of your posts to fix the formatting of the code. Do not create a new one!