Your question is JSON Value Type Consistency. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Quizlet content services exchange collections of JSON objects for surfaces such as Quizlet Study Sets. Given a list of objects and a key, determine whether every object contains that key with the same JSON value type.
The JSON type categories are null, boolean, number, string, array, and object. Treat all numeric values as the number type, and ensure booleans are not classified as numbers. If any object is missing the key, return False. An empty input list is valid and returns True.
Implement verify_json_key_types(objects, key).
objects is a list of JSON objects represented as Python dictionaries.key is a non-empty string.key and all corresponding values have the same JSON type.key matters. Nested contents do not need to match.numberdef verify_json_key_types(objects, key):