Problem Description

You get a JSON array and a type name. Keep only items matching that type (number,string,boolean,null,array,object) and print the resulting JSON array.

Input Format

Line1: JSON array. Line2: type string.

Output Format

One line JSON array.

Sample Test Case

Input:
[1,"a",null,[2],{"x":1},true] array
Output:
[[2]]

Constraints

Type string is one of: number,string,boolean,null,array,object.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next