I create one function in NodeJS. It looks like this:
function photoGenerator() {
var jsonArray = new array;
for (i = 0; i < 10; i++) {
data = new Object();
var recoCat = recommandCat[Math.floor(Math.random() * 4)];
data = {
tomEngine: {
mediaType: "photo",
recommendset: [recommendCat: "+recoCat+", recommendResult: [
mediaId: "",
mediaEntry: [
user1: {
name: "sooin",
rating: "3",
views: "2",
like "ture",
comment: "good"
},
user2: {
name: "sara",
rating: "1",
views: "4",
like "ture",
comment: "good!"
}],
view: "4",
rating "4",
like: "10",
attribute: {
smallUrl: "www",
largeUrl: "llll",
title: "aaaa"
}, ], ],
}
};
jsonArray.push(data);
}
return jsonArray;
}
It is giving me the following error:
recommendset:[recommendCat:"",recommendResult:[ mediaId:"",mediaEntry:
I think my JSON format is right. Can anybody tell me how to figure out that error?