TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
prasanna p
1.3k
470
103.4k
Getting cannot access child key error from the Web API
Sep 20 2020 1:23 AM
Hi friends,
I am getting response content from the Web API using Jobject
Jobject obj=JObject.Parse(responsecontent); but always I am getting the following error.
cannot access child key value on newtonsoft.json.linq.jvalue
My Json Sample :
{
"jsonrpc": "2.0",
"id": null, "result": "{\"status\": \"success\", \"res\": [{\"Rollnumber\": \"1581\", \"Receipt Time\": \"13:38:32\"},{\"Rollnumber\": \"1582\", \"Receipt Time\": \"15:10:32\"}]}}
I tried with Jobjects and Jtokens I am getting the result in the object but I am unable get the child object
res\
token object values to insert this data into the sql server datatable.
I tried with res keyword and using stringbuilder I am concatinating \ to res i.e res\ keyword.
I tried different ways but always getting the cannot access child key value on newtonsoft.json.linq.jvalue error.
Please tell me how to get the res object and using loop I need to insert res object values in the sql server datatable.
Reply
Answers (
4
)
How to bind dynamic table in Datatable in mvc?
How to load the datatable td values using ajax success function in mvc