Which method is used to convert JSON data to a JavaScript object?
a)
JSON.parse()b)
JSON.stringify()c)
Object.assign()d)
Array.from()Answer:
a)
JSON.parse()Explanation:
The JSON.parse() method is used to convert a JSON string into a JavaScript object. This is commonly used when receiving JSON data from an API or another external source.