title: JSON to CSV : Multiple Data Rows
body: <p>I have been trying to write to a CSV file from a JSON file using NorthConcepts datapipeline library in the following way, however I have problems. The data in the JSON file is either repeated or the fields are Seperated and written in different rows. For instance from the given code below I could have a combination of the following rows : Row 1 : CreatedAt, ID, Row 2 : CreatedAT, ID, IDString, Row 3 : CreatedAt, IDString likewise. I have about 30 fields and about 4 rows in the CSV file writing data for the same record but with split fields filled in. Would anyone know what the problem is? The JSON file I am reading from doesnt have repetitive data. </p>
  
  <p>I read data the following way : </p>
  
  <pre><code>DataReader reader = new JsonReader(new File(FILE))
  .addField("CreatedAt", "//array/object/created_at")
  .addField("ID", "//array/object/id")
  .addField("IDString", "//array/object/id_str")
  .addField("Text", "//array/object/actualTweet")
  </code></pre>
  
  <p>Writing data the following way : </p>
  
  <pre><code>DataWriter writer = new  CSVWriter(new File("../Twix/files/x.csv" ));
  JobTemplate.DEFAULT.transfer(reader, writer); 
  </code></pre>
  
  <p>The library used : <a href="http://northconcepts.com/data-pipeline/" rel="nofollow">http://northconcepts.com/data-pipeline/</a>
  javadocs : <a href="http://northconcepts.com/data-pipeline/javadocs/" rel="nofollow">http://northconcepts.com/data-pipeline/javadocs/</a></p>
  
  <p>Example CSV : </p>
  
  <pre><code>  Name  ProfileImageURL Location    CreatedAt   FollowRequestSent   IsTranslator    DefaultProfile  FavouritesCount ContributorsEnabled
    The Guardian      London                      
    The Guardian      London                      
    The Guardian      London  Thu Nov 05 23:49:19 +0000 2009              130 
    The Guardian      London  Thu Nov 05 23:49:19 +0000 2009              130 
    The Guardian      London  Thu Nov 05 23:49:19 +0000 2009              130 
      http://pbs.twimg.com/profile_images/2814613165/f3c9e3989acac29769ce01b920f526bb_normal.png          FALSE   FALSE   FALSE       FALSE
  </code></pre>
  
  <p>Here the URL given above is for the second column. </p>