I'm dealing with a basic array structure that resembles:
obj = {1:false, 2:true, 3:true}
My goal is to extract an array containing all the keys in the object that have a value of true.
In Python, you can achieve this easily using:
>>> [key for key in obj if obj[key]]
[2, 3]
Is there a succinct or one-line method to accomplish this task in JavaScript? I also happen to have lodash at my disposal.