Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function convertToObject(jsonString) {
- let person = JSON.parse(jsonString);
- let personInfo = Object.entries(person);
- for (let [key, value] of personInfo) {
- console.log(`${key}: ${value}`);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment