I want to export a test data but i keep getting stuck at some point. My test data is something like this. I have 2 json objects(mentioned only one in below code but both are similar),4 arrays, and 2 variables. data.js
exports.category={
price : [
{"film":
{F: [a,b,c],
I: [d,e,f],
L: [g,h,i],}
}
],
arr1=[F,I,L],
arr2=[10,20,50],
arr3=[A,U,I],
arr4=[2,5,10],
minimumvalue=2,
maximumvalue=5000,
}
I import the data in another js file with
import category from './data.js';
There were no explicit errors in editor but when i run the code, i get error as unexpected token
Unexpected token (61:7)
59 | }
60 | ],
> 61 | arr1=[F,I,L],
| ^
62 | arr2=[10,20,50],
63 | arr3=[A,U,I],
64 | arr4=[2,5,10],
[0-0] FAILED in chrome -
I thought it is due to json object and changed my data into map array, even then i got errors w.r.t exporting. What am i doing wrong? How should i change it ? Thanks in advance
Update: After multiple attempts, i decided to keep all the arrays and variables in other file where i do my validations, now i am getting the below error.
[chrome 85.0.4183.83 Windows NT #0-0] json is not defined
[chrome 85.0.4183.83 Windows NT #0-0] ReferenceError: json is not defined
for validations, i will get the values first and then,with some conditions i already have, i will choose one value (like we do with excel by searching with row and column index)