• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 444
  • Last Modified:

JSONPath and JSON with string variables

I went to a JSONPath verification site:

http://jsonpath.curiousconcept.com/

Open in new window


I have a string: contained within the following JSON object:

{"string":"abc"}

Open in new window


I used the following JSONPath expression to get the value of "string"

$.string

Open in new window


and this returned to me the value of

   "abc"

Open in new window



My qusetion is:  is there a JSONPath expression that I can use that will return the value of "string" without the double quotes enclosing the string, in other words, is there a way to write a JSONPath expression tha twill return the following:

   abc

Open in new window


Thanks
0
Anthony Lucia
Asked:
Anthony Lucia
  • 2
2 Solutions
 
J NUnicorn wranglerCommented:
Im pretty sure this is the standard format of Json

http://json.org/example
0
 
J NUnicorn wranglerCommented:
for more information on json
http://json.org/
0
 
GaryCommented:
It's returning what is expected, the same as if you did

somevar = "abc";

When you work on the value it isn't "abc" you are working on, it will be just abc
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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