How to Convert deceased data file to JSON

Blog Home Index & Contents

How to Convert Deceased list data to JSON format

Here's how:

Website used to convert from CSV to JSON

  1. open the CSV file in libre office and add a header to the top line of the spreadsheet and save as a csv file.
https://www.convertcsv.com/csv-to-json.htm
  1. Choose the INPUT file: deceased.csv
  2. thru step 4) optional
  3. step 5 click CSV to JSON tab and this is what the output looks like:
[
 {
   "AHSAAID": 85901,
   "Year": "1000",
   "Last": "Abbott",
   "First": "Clair",
   "Middle": "",
   "HSLast": "Abbott",
   "HSFirst": "Clair",
   "HSMiddle": "",
   "Birth": "3-31-1917",
   "DOD": "March 11, 1998",
   "Place": "Boone, Iowa",
   "Reference": ""
 },
 {
   "AHSAAID": 88701,
   "Year": "1000",
   "Last": "Acuff",
   "First": "Hoyt",
   "Middle": "",
   "HSLast": "Acuff",
   "HSFirst": "Hoyt",
   "HSMiddle": "",
   "Birth": "12-2-1925",
   "DOD": "5-10-2015",
   "Place": "AMES, IOWA",
   "Reference": "AMES TRIBUNE 5-12-2015"
 }
 ]

 ### Add module.exports = [   beginning of JSON File

Add module.exports = [ as the first line in this new deceased.js file and move to the _data directory. I will show you how to use this file in the next few blog posts when I figure out how myself. ;-)

 module.exports = [
  {
    "AHSAAID": 85901,
    "Year": "1000",
    "Last": "Abbott",
    "First": "Clair",
    "Middle": "",
    "HSLast": "Abbott",
    "HSFirst": "Clair",
    "HSMiddle": "",
    "Birth": "3-31-1917",
    "DOD": "March 11, 1998",
    "Place": "Boone, Iowa",
    "Reference": ""
  },
  {
    "AHSAAID": 88701,
    "Year": "1000",
    "Last": "Acuff",
    "First": "Hoyt",
    "Middle": "",
    "HSLast": "Acuff",
    "HSFirst": "Hoyt",
    "HSMiddle": "",
    "Birth": "12-2-1925",
    "DOD": "5-10-2015",
    "Place": "AMES, IOWA",
    "Reference": "AMES TRIBUNE 5-12-2015"
  }
  ]