Forum Discussion

rockGn0me's avatar
rockGn0me
Occasional Contributor
8 years ago
Solved

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?

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

     

    [$respondants][0].uuid

2 Replies

  • PaulMS's avatar
    PaulMS
    Super Contributor

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

     

    [$respondants][0].uuid

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    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