Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi, Attached below is the reqst JSON. can any one help me on generating/ creating a request body for the same.
JavaScript
{
  "groups": [{
      "groupName": "abc",
      "questions": [{
          "questionID": "",
          "groupedIndexVlaue": 2,
          "indexvalue": 6
        }, {
          "questionID": "",
          "groupedIndexVlaue": 2,
          "indexvalue": 6
        }

      ]
    }, {
      "groupName": "xyz",
      "questions": [{
          "questionID": "",
          "groupedIndexVlaue": 2,
          "indexvalue": 6
        }, {
          "questionID": "",
          "groupedIndexVlaue": 1,
          "indexvalue": 7
        }
      ]
    }
  ]
}


I need the request body like below to work with post method. Please any one suggest me how to form the request body as per the above Json.

JavaScript
{
  "Items": [{
      "questionID": 1,
      "groupedIndexVlaue": 5,
      "indexvalue": 5
    }, {
      "questionID": 2,
      "groupedIndexVlaue": 5,
      "indexvalue": 5
    }

  ]
}


Thanks.

What I have tried:

Attached below is the reqst JSON. can any one help me on generating/ creating a request body for the same.
Posted
Updated 15-Feb-17 21:48pm
v2
Comments
Richard Deeming 14-Feb-17 9:28am    
What have you tried?

Retyping the question in the "What I have tried" section does not tell us what you have tried.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900