Thanks for the great post. I'm so new to JSON and DynamoDB, so this was really helpful. I just got hung up in one spot. I was able to create the table, but had trouble loading the data. I saved scrantonData.js, but the code to parse and load is looking for a json file. I resaved it as a json, but the parser doesn't like the contents of the file. Errored out once it reached the "i" in "id". Got any tips for me?
Thanks for reaching out to me. It's actually my mistake. Firstly, the file should have been saved as a .json file and secondly with proper JSON syntax. I have updated former scrantonData.js into scrantonData.json file with proper syntax.
Copy the JSON file to your IDE and then create a new file called putScrantonData.js and copy the last code snippet and run node putScrantonData.js
Hi Ajin,
Thanks for the great post. I'm so new to JSON and DynamoDB, so this was really helpful. I just got hung up in one spot. I was able to create the table, but had trouble loading the data. I saved scrantonData.js, but the code to parse and load is looking for a json file. I resaved it as a json, but the parser doesn't like the contents of the file. Errored out once it reached the "i" in "id". Got any tips for me?
Hello Livi,
Thanks for reaching out to me. It's actually my mistake. Firstly, the file should have been saved as a
.json
file and secondly with proper JSON syntax. I have updated former scrantonData.js into scrantonData.json file with proper syntax.Copy the JSON file to your IDE and then create a new file called
putScrantonData.js
and copy the last code snippet and runnode putScrantonData.js
If you run into any trouble, I'll be here.
Worked perfectly, thank you!
Awesome :)