Reputation: 624
I have installed JSON5 by npm install -d -g json5
and trying to parse the json string. But it is showing me [[object Object]]JSON5.parse is not a function
. What the problem actually here is? and how we can resolve this? I am using the following code-
const JSON5 = require("json5")
var jsonV = JSON5.parse(fileStr)
Thanks!
Upvotes: 1
Views: 999