June 13, 2017

enum is a reserved keyword so you should not use such reserved keywords.

Find a working example of your code below:

var t_enum = {
    aitem: {
        Desc: 'A description',
        Value: 0,
        Group: 'A'
    },
    bitem: {
        Desc: 'b description',
        Value: 1,
        Group: 'B'
    },
    bitem: {
        Desc: 'c description',
        Value: 2,
        Group: 'C'
    }
}
var neededGroup = 'A';
var neededValues = [];

Object.keys(t_enum).forEach(function (x) {
    var item = t_enum[x];
    if (item.Group == neededGroup){
        neededValues.push(item.Value);
        return;
    }
})
console.log(neededValues);

Demo

Its an alternate approach from what Toddo is suggesting.

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!