Slackbot
01/20/2023, 5:15 PMTom
01/20/2023, 5:34 PM{{{jsonPath request.body '$..paths[1].source[0]'}}}
Aaron
01/20/2023, 5:36 PM.
between the $
and the rest of the expression. The following returned what you’d expect:
"response": {
"status": 200,
"body": "{\"id\": \"{{{jsonPath request.body '$.paths[1].source'}}}\" }"
}
{
"id": "blablablah2"
}
As for why… I don’t know 🤷🏻Tom
01/20/2023, 5:37 PM$..
is a query, meaning it always returns a list of resultsTom
01/20/2023, 5:38 PM.
indicates a selector, which is potentially only one element.Aaron
01/20/2023, 5:38 PMTom
01/20/2023, 5:38 PMAaron
01/20/2023, 5:39 PMPavel Serada
01/20/2023, 5:39 PMPavel Serada
01/20/2023, 5:59 PM