| Viewed 42 times

How to parse array of JSON object in JavaScript


Using javascript How I can parse array of JSON object in JavaScript

1 Answer
Mohammad Qandeel
Answered
19

with JSON.parse() you can parse array of JSON object in JavaScript.

When receiving data from a web server, the data is always a string.

I`ll show you how to parse array of JSON object in JavaScript with example

if i have this Json String '{ "name":"QandeelAcademy", "url":"www.qandeelacademy.com"}'

i`ll convert it to JS object using JSON.parse() 

let website = JSON.parse('{ "name":"QandeelAcademy", "url":"www.qandeelacademy.com"}');
console.log(website.name); //QandeelAcademy
console.log(website.name); //www.qandeelacademy.com


Related Questions