Closed

Parse HTML Table into JSON with JavaScript

This project was awarded to pixecs for $30 USD.

Get free quotes for a project like this
Employer working
Awarded to:
Skills Required
Project Budget
$30 - $250 USD
Total Bids
22
Project Description

Write a quick JavaScript script (in Node, jQuery, etc., doesn't matter) that parses the content from each item in the Periodic Table of Elements into JSON:

- table: [url removed, login to view]
- one of the elements: [url removed, login to view]

The JSON should just be `{"Key 1": "Value 1", "Key 2": "Value 2"}`, whatever the values are. So for this table:

...
25 - Manganese (Mn)
Atomic Weight: [url removed, login to view](5)
Ionization Energy: [url removed, login to view] eV
...

You would have JSON like `{"25": "Manganese (Mn)", "Atomic Weight": "[url removed, login to view](5)", "Ionization Energy": "[url removed, login to view] eV"}`. It doesn't matter if you get more specific and divide up the `{"25": "Manganese (Mn)"}` into something like `{"id":25, "name": "Manganese (Mn)"}`. It all depends on the table structure and whatever is easiest.

The JavaScript just needs to be able to take any HTML string from one of those entries, and output JSON. Don't worry about any crawling logic, just need to be able to parse 1 entry. It should be a very short and quick script to write. You can manually copy/paste the HTML from one of those pages and work with that, don't worry about making HTTP requests or anything, just convert the string to JSON please.

Thanks!

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online