deserialize json jquery 1

deserialize json jquery

const json = '{ "fruit": "pineapple", "fingers": 10 }';
const obj = JSON.parse(json);
console.log(obj.fruit, obj.fingers);

Here is what the above code is Doing:
1. We create a string called json that contains a JSON object.
2. We use JSON.parse() to convert the string into an object.
3. We access the object’s properties using dot notation.

Similar Posts