I have a simple javascript file, javascriptvar.js, which contains a json within that file like this:

```
  var ajavascriptjsonvariable = {   
            id: "someid",
            name: "somerandomname",
           data: {},
           children: []       
       }; 

```

What i am trying to do is to simply make the var ajavascriptjsonvariable equal to a text file where the json is stored. So i create a file called "data.json" with this inside:

```
      { 
              id: "someid",
              name: "somerandomname",
             data: {},
             children: []       
          }

```

(I'm not sure if i need a semicolon in the end of data.json or not?)

And now i try to make the variable ajavascriptjsonvariable in the js file read the data.json file, but it won't go through. Here's what i do:

```
  $.getJSON("data.json", function(data){});
 var ajavascriptjsonvariable = data;

```

How do i get the ajavascriptjsonvariable = the data.json file? 

Edit, sorry, quotes were a typo, corrected them, what i am asking is i think i'm supposed to include something into function(data){} brackets part to make ajavascriptjsonvariable read the data.json file, i don't know that part, that's what i'm trying to figure out.