map over object

by Ethan Ryan

JavaScript

var obj = {"a" :[ 
       {
            "b": "name_1",
            "c":[
                   {"d": "value_1", "e": "true"},
                   {"d": "value_2"},
                   {"d": "value_3", "e": "true"}
                ]
       },
       {
           "b": "name_2",
           "c":[
                   {"d": "value_4", "e": "true"},
                   {"d": "value_5"},
                   {"d": "value_6"}
                ]}
       ] 

}
//console.log('obj is: ', obj)
//console.log('obj.a is: ', obj.a)
var array = obj.a
var x = array.map(function(eachThing) {
	var newArr = eachThing.c
  newArr.map(function(eachObj) {
  console.log(eachObj)
  if (eachObj.e === "true")
  console.log('delete this!')
  })
})
x