Merge Defaults With User Config

NodeJS Medium 4 views
Back to Questions

Problem Description

Merge user config JSON into defaults and print final JSON.

Input Format

stdin: JSON object.

Output Format

Print JSON.

Sample Test Case

Input:
{\"theme\":\"dark\"}
Output:
{ \"site\": \"meetcode\", \"theme\": \"dark\" }

Constraints

If parse fails, use defaults only.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next