Something like this should do:

(function() {
  var array = {sem1: {
    cs: [{
      "sub": "sub1",
      thumb_src: "img/thumb_images/wizard1.jpg",
      abbrev: "sub"
    }, {
      sub: "sub2",
      thumb_src: "img/thumb_images/wizard2.jpg",
      abbrev: "sub"
    }, {
      sub: "sub3",
      thumb_src: "img/thumb_images/wizard1.jpg",
      abbrev: "sub"
    }]
}};

let result ="sem1.cs".split('.')
    .reduce((r,c) => r[c], array)
    
console.log(result)
}());

If you need to mix in array's into the objects it becomes a bit more 
involved, but this should be enough to get your going.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to