Problem Description

You get a JSON object, then a path string like a.b[0].c. Print the value at that path as JSON. If path does not exist, print null.

Input Format

Line1: JSON object. Line2: path string.

Output Format

One line JSON output.

Sample Test Case

Input:
{\"a\":{\"b\":[{\"c\":5}]}} a.b[0].c
Output:
5

Constraints

Path length up to 2e5.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next