title: Object.create() says parameter is not an object
body: <p><strong>Description</strong></p>
  
  <p>In my program I am reading a JSON file, parsing it into an object and then I try to "cast" it into an object of the class <code>ProjectFile</code> using <code>Object.create()</code>.</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>let tmpFileContent = fs.readFileSync(tmpPath, {encoding: 'utf-8'});
  let tmpObject = JSON.parse(tmpFileContent);
  console.log(tmpObject);
  fileList[fileList.length] = Object.create(ProjectFile, tmpObject);
  </code></pre>
  
  <p><strong>Log</strong></p>
  
  <p><a href="https://i.stack.imgur.com/5brzm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5brzm.png" alt="log"></a></p>
  
  <p><strong>Question</strong></p>
  
  <p>When I output <code>tmpObject</code> using <code>console.log(tmpObject);</code> it says that it is an object in the log. In the line after that I try to use it as object which should be casted into an object of the class ProjectFile but it displays the error message that it is not an object. What am I doing wrong?</p>
  
  <p><strong>Edit: ProjectFile class</strong></p>
  
  <pre><code>class ProjectFile {
    constructor(p_name, p_path, p_type, p_thumnailPath) {
      this.name = p_name;
      this.path = p_path;
      this.thumnailPath = p_thumnailPath;
    }
  }
  </code></pre>
  
  <p><strong>Edit 2: Working code</strong></p>
  
  <pre><code>let tmpFileContent = fs.readFileSync(tmpPath, {encoding: 'utf-8'});
            let tmpObject = JSON.parse(tmpFileContent);
            console.log(tmpObject);
            fileList[fileList.length] = Object.create(ProjectFile, {
              name: {
                value: tmpObject.name,
                writable: true,
                enumerable: true,
                configurable: true
              },
              path: {
                value: tmpObject.path,
                writable: true,
                enumerable: true,
                configurable: true
              },
              thumnailPath: {
                value: tmpObject.thumnailPath,
                writable: true,
                enumerable: true,
                configurable: true
              }
            });
  </code></pre>