I am trying to convert this "b'{"raw": 1587513600, "fmt": "2020-04-22"}'" to string in javascript



  • I am trying to convert this "b'{"raw": 1587513600, "fmt": "2020-04-22"}'" to string in javascript, so I can use JSON.parse to convert the string to an object



  • Hey @Nature-Square

    I would recommend formatting any code that you have in your post. It makes it easier to read.

    So what parts EXACTLY of the following would you like to convert to a string?

    "b'{"raw": 1587513600, "fmt": "2020-04-22"}'"

    What is the current type? You can use the built in typeof function to test e.g. typeof argument


Log in to reply