title: Cannot pass array from getStaticProps in Next.js
body: <p>When I pass a JSON array from getStaticProps in Next.js, I get the following error on accessing it.</p>
  
  <pre><code>TypeError: Cannot read property 'contentBody' of undefined
  module.exports../pages/[author]/[article].js.__webpack_exports__.default
  ./pages/[author]/[article].js:17
   14 |     &lt;img/&gt;
   15 | &lt;/Center&gt;
   16 | &lt;Center className={Style.contentContainer}&gt;question
  &gt; 17 |     &lt;Content&gt;
      | ^  18 |         {
   19 |             `${props.posts.contentBody}`
   20 |         }
  </code></pre>
  
  <p>The code: <code>pages/[author]/[article].js</code></p>
  
  <pre><code>import Center from "../../components/Center/Center";
  import Style from "../../modules/article.module.css"
  import React from "react"
  import CommonContainer from "../../components/CommonContainer/CommonContainer";
  import Content from "../../components/Content/Content";
  //static content
  import fs from 'fs'
  import path from 'path'
  
  export default (props) =&gt; {
      return (
          &lt;CommonContainer&gt;
              &lt;Center className={Style.mainImg}&gt;
                  &lt;img/&gt;
              &lt;/Center&gt;
              &lt;Center className={Style.contentContainer}&gt;
                  &lt;Content&gt;
                      {
                          `${props.posts.contentBody}`
                      }
                  &lt;/Content&gt;
              &lt;/Center&gt;
          &lt;/CommonContainer&gt;
      )
  }
  
  export async function getStaticProps({params}) {
      const articlePath = path.join(process.cwd(), `SampleArticles/${params.author}/${params.article}.json`);
      let posts = JSON.parse(fs.readFileSync(articlePath).toString());
      return {
          props: {
              posts,
          },
      }
  
  }
  
  export async function getStaticPaths() {
      return {
          paths: [],
          fallback: true
      };
  }
  
  </code></pre>
  
  <p>JSON FILE</p>
  
  <pre><code>{
    "title": "rust",
    "author": "AniketFuryRocks",
    "image": {
      "src": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Norco_Range.jpg/2560px-Norco_Range.jpg"
    },
    "contentBody": [
      "as","asd"
    ]
  }
  </code></pre>