Count Data Fields in Object

JavaScript Easy 4 views
Back to Questions
Next Group Students by City Medium N

Problem Description

Given a JSON object, count how many own properties have a value that is NOT a function. Print the count.

Input Format

One line JSON object.

Output Format

One integer count.

Sample Test Case

Input:
{"a":1,"b":"x","c":true}
Output:
3

Constraints

Input is valid JSON and contains only JSON-safe values (no functions inside).

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Next