Tuesday, 4 April 2017

unexpected token inside variable value

I'm trying to use an array in my front end js but trying to use the value with !{} and #{} gives me a syntax error inside the variable. I've tried to json stringify and parse but got no results. here is the code

 var arrayData =("!{adverts}");

and here is what I get

var arrayData =JSON.parse("{ _id: random_String,
updatedAt: 2017-03-02T20:39:35.023Z,
createdAt: 2017-03-02T20:39:35.023Z,
identifier: 'random_string'}");



via immexerxez

No comments:

Post a Comment