Currently working on implementing backbone for a new project along with underscore, requirejs, jquery, and bootstrap. Things are progressing smoothly as I aim to include static survey question data into one of the data models.
{
"defaultOptions": {
"1": "Strongly Agree",
"2": "Somewhat Agree",
"3": "Have Mixed Feelings",
"4": "Somewhat Disagree",
"5": "Strongly Disagree",
"6": "Have No Opinion",
"7": "Do Not Wish To Respond"
},
"questions": {
"1": {
"question": "Question 1",
"options": {}
},
"2": {
"question": "Question 2",
"options": {}
},
"3": {
"question": "Question 3",
"options": {}
},
"4": {
"question": "Question 4",
"options": {}
},
"5": {
"question": "Question 5",
"options": {}
}
}
}
Currently without access to the final data API intended for the project, using dummy data extracted from the previous version related to the US Elections cycle which occurs annually. Separating out some static content model data into a different file to prevent accidental alterations. Working within the same server constraints and processing JSON through for validation.
Encountering an error in Chrome "Uncaught SyntaxError: Unexpected token : on line 2" and FireFox displays 'SyntaxError: missing ; before statement "defaultOptions":', focusing on the : following defaultOptions.
Calling two json files consecutively:
var survey = require('/elections/data/surveyQuestions.json');
var endorsements = require('/elections/data/endorsements.json');
No issues with endorsements.json file or other required contents. Referencing endorsements.json below:
[
"Abortion Rights Council",
"AFL-CIO",
"AFSCME",
"American Federation of Teachers",
"Building and Construction Trades Council",
"DFL Feminist Caucus",
"DFL Party",
"Education Minnesota",
"Freedom Club",
"GOP Feminist Caucus",
"Grassroots Party",
"Green Party of Minnesota",
"Independence Party",
"Libertarian Party of Minnesota",
"MAPE",
"Minnesota Citizens Concerned for Life",
"Minnesota Police and Peace Officers Association",
"National Association of Social Workers",
"Republican Party of Minnesota",
"Sierra Club",
"Stonewall DFL",
"TakeAction Minnesota",
"Taxpayers League of Minnesota",
"Teamsters DRIVE",
"United Auto Workers"
]
Any insights on resolving the issue would be greatly appreciated.