JS: JSON retrieve all JSON data

    var ob = {
          "a":[
               "a1",
               "a2"
               ],
          "b":[
               "b1",
               "b2"
               ],
          "c":[
               "c1",
               "c2"
               ]
          }

var keys = Object.keys(ob)

console.log(keys)

keys.forEach(key => {console.log(ob[key])})

Browse More Popular Posts

Leave a Comment