-1

I'm trying to upload a HTM file using in Vue. The data is actually a styled table using , , etc...

My question is that, is it possible to filter out the tabulated data in HTM into other forms of data, say JSON? - Picture below (taken from browser elements of the htm) - Basically I just want to filter out html syntaxes and just retrieve the data.

enter image description here

7
  • sure, you could process the rows, each row could have the values of the cells in an array ... so you'd end up with a 2d array like [[row1-cell1, row1-cell2,.....],[r2c1, r2c2,....], ...] Commented Sep 19, 2022 at 6:02
  • stackoverflow.com/questions/61169217/… Commented Sep 19, 2022 at 6:05
  • 1
    thing is, this is vue ... how was the table created in the first place? Commented Sep 19, 2022 at 6:07
  • @Chiu After upload HTML file, You mean you are getting HTML content as a response from an API call and you want to just filtered out the html syntaxes ? If yes, you can achieve that by using RegEx and remove the HTML syntaxes. Commented Sep 19, 2022 at 6:52
  • @JaromandaX it is a HTM file being uploaded to a website created using Vue. Commented Sep 20, 2022 at 3:20

1 Answer 1

0

Solution: use RegEx to filter HTML syntaxes.

Similar post: Regular expression to remove HTML tags from a string

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

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

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.