Is it possible to get an array of all subentries with a certain name of an array? For example, I have this array:
var array = [
{
"char": "a",
"number": 5
},
{
"char": "x",
"number": 9
},
{
"char": "u",
"number": 2
},
{
"char": "q",
"number": 4
}
];
How can I then get an array of all number (or all char) entries like this?
*returned array* = ["a", "x", "u", "q"];
or *returned array* = [5, 9, 2, 4];
A simple (one-line) solution would be most helpful. Thanks in advance!