Which method converts a JSON string into a JavaScript object?

JavaScript Associate Easy

JavaScript Associate — Easy

Which method converts a JSON string into a JavaScript object?

Key points

  • JSON.parse() is used to parse JSON strings into JavaScript objects.
  • JSON.stringify() is used to convert JavaScript objects into JSON strings.
  • Object.fromJSON() and JSON.decode() are not valid methods for converting JSON strings to JavaScript objects.

Ready to go further?

Related questions