Create Array from Array of Objects
Looking for optimized solution for below program.
ArrayOfObj = [ {name: "XYZ" , age:30}, {name: "ABC" , age:30},{name: "ABC" , age:17},{name: "ABCD" , age:41},{name: "XYZ" , age:30}....... n objects ]
Now , I want to get the name(only) in array from all the objects whose age = 30 . output = ["XYZ", "ABC","XYZ" ........]