Given an object or an array, return if it is empty.
- An empty object contains no key-value pairs.
- An empty array contains no elements.
You may assume the object or array is the output of JSON.parse.
obj = {"x": 5, "y": 42}
// Output: falseExplanation :
The object has 2 key-value pairs so it is not empty.
obj = {}
// Output: trueExplanation :
The object doesn't have any key-value pairs so it is empty.
obj = [null, false, 0]
// Output: falseExplanation :
The array has 3 elements so it is not empty.
objis a valid JSON object or array2 <= JSON.stringify(obj).length <= 105