---
title: "Comment by Mohd Shakree Elmi Azmee on \"Convert A CSV To A JavaScript Array of Objects — The Practical Guide\" | Hashnode"
description: "Hello, I&#39;m new to Javascript, after trying the above, I realize there is &#39;\\r&#39; at the end of the last column (including the rows). How do I fix this?"
url: "https://hashnode.com/posts/convert-a-csv-to-a-javascript-array-of-objects-the-practical-guide/6322e5018350c8888bf3043b/comment/634d2493d3656a77ce8766af"
---

[Discussion](https://hashnode.com/posts/convert-a-csv-to-a-javascript-array-of-objects-the-practical-guide/6322e5018350c8888bf3043b)

Comment [Convert A CSV To A JavaScript Array of Objects — The Practical Guide](https://hashnode.com/posts/convert-a-csv-to-a-javascript-array-of-objects-the-practical-guide/6322e5018350c8888bf3043b)

[Mohd Shakree Elmi Azmee](https://hashnode.com/@shakreeelmi)

[Oct 17, 2022](https://hashnode.com/posts/convert-a-csv-to-a-javascript-array-of-objects-the-practical-guide/6322e5018350c8888bf3043b/comment/634d2493d3656a77ce8766af)

Hello,

I'm new to Javascript, after trying the above, I realize there is '\\r' at the end of the last column (including the rows). How do I fix this?

Thank you.

[Mohd Shakree Elmi Azmee](https://hashnode.com/@shakreeelmi)

[Oct 17, 2022](https://hashnode.com/posts/convert-a-csv-to-a-javascript-array-of-objects-the-practical-guide/6322e5018350c8888bf3043b/comment/634d2493d3656a77ce8766af#reply-634d2730d3656a77ce876732)

Nevermind, I got it working.

I used .replace to remove the \\r.

Thanks!

[Dev By RayRay](https://hashnode.com/@devbyrayray)

[Oct 19, 2022](https://hashnode.com/posts/convert-a-csv-to-a-javascript-array-of-objects-the-practical-guide/6322e5018350c8888bf3043b/comment/634d2493d3656a77ce8766af#reply-634fbe96770c93961f03be92)

[Mohd Shakree Elmi Azmee](https://hashnode.com/@shakreeelmi) I'm happy you got it working 👍 This perfectly fits in the process of being a developer right 😅
