Hi All,
Here am trying to retrieve data from text file and embed them to HTML table based on some condition.
Below is the code which is written in...
For further actions, you may consider blocking this person and/or reporting abuse
Try putting a console.log in your filter callback function to see what values it's actually fetching and comparing from the file.
Thanks Edward for reaching out. I see that it fetches exactly same values as in text file inside filter callback. Also its datatype is string for each values
So, if the values are exactly the same, the filtered array wouldn't be empty. I'd try adding more to the console.log statement. For example:
If this outputs something like p, false then my guess is the value variable has a phantom space around it. You could test that with something like:
If there's a phantom space, you should see something like "xxp xx" or "xx pxx"
Thank you Ellsworth for your response . I tried putting above checks and see that condition return false but strangely there is no phantom space even.
Hmm. I'm curious, if you do console.log(lineByline) what does it display? Or maybe console.table(lineByline)?
thank you for your response. Attaching the response for console.log(line) , lineByline and console.table(lineByline) inn sequence.
I'm not sure what, but something is off about your array. Console.table is only showing the index. Unless this is a browser quirk I'm not aware of, it should be showing corresponding values.
Yes may be browser issue. Let me then try in different browser and check. Thanks
Is TXT file was a table or database? Or paragraph.... And how many such files you need to convert?
Thanks Manish. Text file will always contain one column data and only one file need to be converted.
May be this is not best answer but it may solve your problem.
Open your text file with ms Excel with limiting tab . You will see all your text column in first column on excel sheet.
Now, you can work on this textfile and save it either SQL or text file which will be easy to get modified results with your jQuery codes.
Ms Excel is superb program. It helped me in many cases.