Answers for "string to object conversion"

PHP
12

string to object

const json = '{ "fruit": "pineapple", "fingers": 10 }';
const obj = JSON.parse(json);
console.log(obj.fruit, obj.fingers);
Posted by: Guest on May-20-2020

Code answers related to "string to object conversion"

Browse Popular Code Answers by Language