1

In insomnia, I want to use a property in a response (JSON) to set up a dynamic variable (like the token get in another query and then used as auth in the current query)

My first query return a response like this:

"@type": "hydra:Collection", 
    
"hydra:member": [   
    
    {

        "@id": "\/domain\/v1\/contracts\/123456",   
        
        "@type": "contract",        
    
        "plateNumber": "CHU-VLP156"
    }
]

And I want to user the "@id" in another query with the edit tag function, but I cant retrieve the @id in the JSONpath ($.hydra:member.0.@id)

I already try to escape the @ with backlashes, quote, etc missing it but it keep telling me there's a invalid JSON path. I'd like to get the content of this variable and use it in a tag.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
SpOOnisBacK
  • 119
  • 7

1 Answers1

0

Got it ....RTFM

To escape the @ you just have to had a backtick like this ` in front of it.

SpOOnisBacK
  • 119
  • 7