Finalized script. The full json file generated is quite large, so all but the essentials for the specific project were commented out to minimize the generated file size.