[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 666
  • Last Modified:

JSONPAth and Conditional statements WITH JavaScript

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:

    http://goessner.net/articles/JsonPath/

Open in new window


and using this tester:

    http://jsonpath.curiousconcept.com/

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

Thanks
0
Anthony Lucia
Asked:
Anthony Lucia
1 Solution
 
Tom BeckCommented:
jQuery okay?

http://api.jquery.com/jquery.parsejson/

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

Featured Post

Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as high-speed processing of the cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now