Last active
March 12, 2019 17:21
-
-
Save LiamDobbelaere/41108b286ee0428f9b89e33c01c142b4 to your computer and use it in GitHub Desktop.
Node oneliner to convert a facebook message.json to a plaintext, alphanumeric chars only
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs.writeFileSync('out.txt', JSON.parse(fs.readFileSync("message.json")).messages.filter(m => m.sender_name == 'Tom Dobbelaere' && m.content.match(/^[0-9a-zA-Z ]+$/)).map(m => m.content).join('\n')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment