Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

retrieve json data

Posted on 2014-02-08
4
Medium Priority
?
392 Views
Last Modified: 2014-02-08
My data is coming back as example below. I just want to retrieve data that says
(( The field Status must be a string or array type with a maximum length of '14'.))


{"update.Status":{"_errors":[{"<Exception>k__BackingField":null,"<ErrorMessage>k__BackingField":"The field Status must be a string or array type with a maximum length of '14'."}],"<Value>k__BackingField":null}}

Open in new window


.error(function () {
                var loc = jqxhr.getResponseHeader('Location');
                var a = $({ text: loc });
                $('#message').html(Status.html);
            });

Open in new window

0
Comment
Question by:Seven price
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 39844889
Check the picture below :
http://jsonviewer.stack.hu/
Test page : http://jsfiddle.net/Bb38d/

var json = {
  "update.Status": {
    "_errors": [
      {
        "<Exception>k__BackingField": null,
        "<ErrorMessage>k__BackingField": "The field Status must be a string or array type with a maximum length of '14'."
      }
    ],
    "<Value>k__BackingField": null
  }
};

var text = json["update.Status"]._errors[0]["<ErrorMessage>k__BackingField"];

// CHECKING
alert(text);

Open in new window

0
 
LVL 9

Author Comment

by:Seven price
ID: 39844899
Actually I made a fix and now the data is like this.

Sort by key
0	"The field Status must b...maximum length of '14'."

Open in new window

0
 
LVL 82

Expert Comment

by:leakim971
ID: 39844902
Close the question, reopen a new one. Thanks.
0
 
LVL 9

Author Comment

by:Seven price
ID: 39844920
0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question