title: How to create initial_data Json fixture for many-to-many relation?
body: <p>I am creating an initializing file for for my django project database. I am doing this using a file called <code>initial_data.json</code> which i have created. For example the following code (when <code>syncdb</code> is run) creates in the model <code>Word</code> a new row where <code>name="apple"</code>:</p>
  
  <p><code>[ { "model": "sites.word", "pk": 1, "fields": { "name": "apple" } } ]</code></p>
  
  <p>I have managed to this so far for several models, the problem is with models that have a many-to-many field. I've looked around for the correct way to do this and have come up empty.</p>
  
  <p>So, for example, if a <code>Model</code> mood has many <code>Interests</code> how would I write in the Json file that mood-1's interests are interest-1, interest-2 and interest-3.</p>
  
  <p>What is the proper way to write in Json a models many-to-many relation?</p>
  
  <p>EDIT:</p>
  
  <p>@pastylegs solution was correct, I was just having trouble because the numbering of my interests was off in the Json file so it couldn't match them with there moods.</p>