I have a syntax error, in my code everything seems to be right but once I go to the console, I have the following error: SyntaxError: missing : after property id
I do not get what id because I do not have any id on the lines of code I am working with.
This is my code:
wizard.place.phones = [];
var phones = $('input[name="place[phones]"]');
var phoneLabels = $('input[name="place[phoneLabel]"]');
for (var i = phones.length - 1; i >= 0; i--) {
wizard.place.phones.push({$(phoneLabels[i]).val(): $(phones[i]).val().trim().replace(/\s+/g, ''),"description": ''});
};
if (wizard.currentIsValid){
wizard.place.save();
}
}
and according to the console the error is on this line:
wizard.place.phones.push({$(phoneLabels[i]).val(): $(phones[i]).val().trim().replace(/\s+/g, ''),"description": ''});
Thanks in advanced.