Weekly Project Update07 Oct 2016
It has been a while, and not for lack of trying. I’ve figured out the the ins and outs of Sequelize-CLI, I’ve been working on building multiple associations and how those work. I’ve been trying to figure out some jQuery and Node nuances. Unfortunately I’ve been swamped with a deadline at work and spending all my time getting the forms/apps for work together, so I haven’t had much time to explore beyond my work.
Anyway, I recently read an article by John Resig about coding every day. Every day he attempts to code at least one hour on side projects. This post was written in 2014 and if you check his GitHub account you’ll see he has a commit every day this year! I’ve been trying my hardest to follow this advice, unfortunately the work hasn’t been on side projects.
Next, a bit of code that I recently figured after days of struggling.
I need this little function to parse dynamically created form elements to input into a database. Here is an example of the raw form content (ExpressJS
The function iterates over each array and creates a new array of objects to conform to SequelizeJS’s create API.
I spent hours searching the internet trying to figure this out and couldn’t find much help. Hopefully this may help some folks, if you have any recommendations on how to improve this code, comments are much appreciated.