30 seconds of codeBack to Home
Removes any properties except the ones specified from a JSON object.
Object.keys() method to loop over given JSON object and deleting keys that are not included in given array.
If you pass a special key,
childIndicator, it will search deeply apply the function to inner objects, too.