Ask a Question

How do i perform a property transfer on a json response that has a leading $

SOLVED
rockGn0me
Occasional Contributor

How do i perform a property transfer on a json response that has a leading $

as an example assume the following has been returned as a response from my get step

 

{
 "$respondants": [{
  "uuid": "5bddcd1a-e8ac-40b4-82c4-7e7c10cee110"
 }, {
  "uuid": "5bddcd1a-e8ac-40b4-82c4-7e7c10cee111"
 }]
}

 

 

I'm wanting to get $respondants[0].uuid in a property transfer but I keep getting the result

 

Path 'respondants' is not found in the current context, its like its ignoring the leading $. what am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
PaulMS
Super Contributor

Re: How do i perform a property transfer on a json response that has a leading $

The dollar sign represents root member object so in this case enclose in brackets like

 

[$respondants][0].uuid

View solution in original post

2 REPLIES 2
PaulMS
Super Contributor

Re: How do i perform a property transfer on a json response that has a leading $

The dollar sign represents root member object so in this case enclose in brackets like

 

[$respondants][0].uuid

View solution in original post

HKosova
Moderator

Re: How do i perform a property transfer on a json response that has a leading $

Besides the square brackets you also need the leading "$." to denote the root member object:

$['$respondants'][0].uuid

 

For those using Ready! API - the syntax without the square brackets will work too:

$.$respondants[0].uuid

Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: