Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (9.5k points)

Below is my JSON String:

{

     "data": [

   {

  "id": "id1",

      "fields": [

        {

          "id": "name1",

          "label": "joker",

          "unit": "year"

        },

         {"id": "name2", "label": "Quantity"},

    ],

      "rows": [    data here....

and closing braces..

Can anyone tell me how to convert it to JSON Object?

1 Answer

0 votes
by (19.7k points)

You can pass the JSON String like below to convert it to object: 

var obj = JSON.parse(string);

Interested in Java? Check out this Java Certification by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Apr 3, 2021 in Java by sheela_singh (9.5k points)
0 votes
1 answer
asked Feb 22, 2021 in Web Technology by Jake (7k points)
0 votes
1 answer
asked Mar 14, 2021 in Java by sheela_singh (9.5k points)
0 votes
1 answer

Browse Categories

...