0

I am new to javascript. I have a csv file that has a column, I want to read all entries of the column and make it list without column_name.

For example; manual_include.csv file has column name "author" and in that column I have author names such as "tom", "jack", "Sara", "Sonia" etc.

I am using

let manualInclude = cat("manual_include.csv");
manualInclude = manualInclude.split("\n");

but it reads "author" too in manualInclude. How can I avoid reading column name? I tried using splice as well. But did not work.

1 Answer 1

1

This should work:

manualInclude = manualInclude.split("\n").splice(0,1);

You can find more information here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice?retiredLocale=de

Sign up to request clarification or add additional context in comments.

2 Comments

It gives me just "author". I want to read except "author".
Sounds more like slice()-function - use splice()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.