Created
September 4, 2021 06:30
-
-
Save yaggytter/f74feeede736c8161bd0eee225a161b4 to your computer and use it in GitHub Desktop.
convert from ndjson to json (Javascript) (JavascriptでNDJSONからJSONに変換)
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
``` | |
var json = "[" + ndjson.replace(/\r?\n/g, ",").replace(/,\s*$/, "") + "]"; | |
var jsondata = JSON.parse(json); | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment