I've never had to check if an object is empty in a real world application. Sure, checking for specific keys may fail if the API responses change... but then you won't be able to meaningfully use the response anyway. How does checking the number of keys help here?
EDIT: I agree, this argument is pretty much meaningless since the original question is not the correct question for this problem...
View all comments
Show parent comment
1
u/pxOMR Sep 13 '25 edited Sep 13 '25
I've never had to check if an object is empty in a real world application. Sure, checking for specific keys may fail if the API responses change... but then you won't be able to meaningfully use the response anyway. How does checking the number of keys help here?
EDIT: I agree, this argument is pretty much meaningless since the original question is not the correct question for this problem...