Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question: You are given a text in JSON format in the form of a string consisting of small and capital English alphabets, curly brackets, double

Question: You are given a text in JSON format in the form of a string consisting of small and capital English alphabets, curly brackets, double inverted commas, commas, and no spaces present anywhere.You are also given Q queries, where each query consists of a key of the given JSON object in the form of a string. For each query, you have to print the value of thatYou are given a text in JSON format in the form of a string consisting of small and capital English alphabets, curly brackets, double inverted commas, commas, and no spaces present anywhere.You are also given Q queries, where each query consists of a key of the given JSON object in the form of a string. For each query, you have to print the value of that key.InputThe first line of the input consists of the s- the JSON string (7<=|S|<=103). The second line of input consists of a single integer Q(1<=Q<=103)the total number of queries. Each of the following Qlines consist of a string t- the key to be queried.OutputThe output should consist of Qlines - in the ithline the value corresponding to the ithquery should be printed.Exampleinput"Student":{"Name":"John","Age":"15"},"Class":"10"3Student.NameStudent.AgeClassoutputJohn1510c++ full code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions