javascript - Can I use ajax/getJson() to grab local variable json arrays? -


for usable code wireframing, never have db/data source begin with, , subsequently throw bunch of json arrays *.js file , call them each object/grid/etc.. populate screens until data modelling/db creation complete.

how would/could write ajax/getjson() function correct flat variable array said *.js file? calling *.json file trivial:

$.ajax({     type: 'get',     url: '*.json',     datatype: 'json' }); 

..but do separate arrays, example:

data.js  var fakedata = [{     "programname": "art blakey",     "programgroup": "jazz messengers", }];  var morefakedata = [{     "programname": "joe dart",     "programgroup": "vulfpeck", }]; 

thank you!

if it's data, make json object holds different arrays , use working approach:

{     "fakedata": [{         "programname": "art blakey",         "programgroup": "jazz messengers",     }],     "morefakedata": [{         "programname": "joe dart",         "programgroup": "vulfpeck",     }] } 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -