I don't know, whether it's possible at all, but here is my problem. This is a JSON containing an array without keys:
{
"SearchResults": {
"tables": [
{
"rows": [
[
"InternalExecutionError",
"An internal execution error occurred. Please retry later.",
"node-prod6",
4
]
]
}
]
}
}
I need to extract node-prod6
using JSONPATH.
In this particular case $.SearchResults.tables[0].rows[0][2]
will do the trick, but the problem is, that I don't know in advance the number rows or their order. All I know, that .SearchResults.tables[0].rows[0]
contains the string I need somewhere. However I know the pattern of what I am looking for: node-*
, so RegEx seems to be the best way, but is it possible to do RegEx matching in JSONPATH in an array without keys? If no, thank you for confirming, if yes, please, help with the syntax.