JSONPAth and Conditional statements WITH JavaScript

Posted on 2014-07-14
Last Modified: 2014-07-14
In a previous thread I asked how to handle JSON and conditional
statemetns without JavaScript.  In this thread I would like
to ask how to use conditional statements WITH JavaScript

I have been reading this site:

Open in new window

and using this tester:

Open in new window

On the tester I use the following JSON Data

    { "identification" : "AAA" }

Open in new window

But I can not find an expression that will return a boolean
for what I am writing in PSEUDO CODE below

    $.identification = 'AAA'

Open in new window

I have 1 question

How would I perform this within JavaScript

Question by:Anthony Lucia
    1 Comment
    LVL 38

    Accepted Solution

    jQuery okay?

    var obj = $.parseJSON( '{ "identification" : "AAA" }' );
    alert( obj.identification === "AAA" );

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
    JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
    This video is a brief demonstration on how to use security groups and Network Access Control Lists (ACLs) in Amazon Web Services.  Security groups and Network ACLs are mechanisms you can use in AWS to control network traffic.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now