Please help me, i'd stuck here i dont know how this will be posible. i want to include a script inside javascript where in i just need to put the script that i include in variable.
here's the code of include.js that i want to include:
[{
"name": "Carrascal",
"path": "M116,-978,109,-983,111,-986,111,-994,88,-972,28,-912,0,-883,1,-871,5,-864,5,-854,2,-829,3,-824,27,-836,39,-841,52,-846,63,-850,76,-857,95,-866,109,-874,122,-876,130,-877,132,-882,132,-900,132,-907,136,-912,141,-916,150,-917,153,-922,157,-924,155,-932,161,-937,166,-938,168,-934,171,-934,173,-940,177,-944,179,-948,176,-953,170,-955,167,-954,161,-949,157,-946,151,-942,146,-934,138,-926,132,-919,123,-916,114,-926,104,-934,99,-941,95,-947,101,-950,111,-953,115,-957,126,-955,136,-961,136,-966,132,-970,137,-976,136,-984,132,-985,126,-980,127,-972,128,-965,124,-961z"
}
]
and here's the code of .js that will call the include.js and set into variable.
data = $.getScript('../mapdata/include.js');
i'd expect the output will be like this:
data = [{
"name": "Carrascal",
"path": "M116,-978,109,-983,111,-986,111,-994,88,-972,28,-912,0,-883,1,-871,5,-864,5,-854,2,-829,3,-824,27,-836,39,-841,52,-846,63,-850,76,-857,95,-866,109,-874,122,-876,130,-877,132,-882,132,-900,132,-907,136,-912,141,-916,150,-917,153,-922,157,-924,155,-932,161,-937,166,-938,168,-934,171,-934,173,-940,177,-944,179,-948,176,-953,170,-955,167,-954,161,-949,157,-946,151,-942,146,-934,138,-926,132,-919,123,-916,114,-926,104,-934,99,-941,95,-947,101,-950,111,-953,115,-957,126,-955,136,-961,136,-966,132,-970,137,-976,136,-984,132,-985,126,-980,127,-972,128,-965,124,-961z"
},
];
Please help me thankyou ..