obj = {
data_a: 'a',
data_b: 'b',
user_a: 'a',
user_b: 'b'
// and many more
};
From the above object how can I group and extract properties based on their name? I'm trying to get all names beginning with data_ and then load them into a new object then do the same for the ones beginning with user_
What is a good way to do this?