title: NodeJS - reading macOS .plist files
body: <p>I have a <code>.plist</code> file on my mac that I would like to read. I can easily open it using Xcode but would like to do it using NodeJS.</p>
  
  <p>I found <code>plist</code> package and I'm trying to use it like this:</p>
  
  <pre><code>import fs from 'fs';
  import plist from 'plist';
  
  fs.readFile('/my/path/here.plist', 'utf-8', (err, data) =&gt; {
    console.log('#data', data);
    const obj = plist.parse(data);
    console.log('#obj', obj);
  });
  </code></pre>
  
  <p>What I'm getting as <code>data</code> is looking like this (a part from that file)</p>
  
  <pre><code>dataYdisplayasZfile-label]file-mod-date[arrangement_preferreditemsize��-   O(book(0$Usersnyc    Downloads �i(�   +� HXhA���L�  file:///Macintosh
  </code></pre>
  
  <p><code>plist</code> package is throwing errors as I guess it expects string in <code>XML</code> format.</p>
  
  <p>How can I read a <code>.plist</code> file like this?</p>