Union With Wildcard And Number
Test Data:
[
"first",
"second",
"third",
"forth",
"fifth"
]
Selector:
$[*,1]
Resul:
Unable to parse token *,1 in expression: [*,1]
Expected result (Proposal A):
[
"first",
"second",
"third",
"forth",
"fifth",
"second"
]
https://cburgmer.github.io/json-path-comparison/results/union_with_wildcard_and_number.html
Can you tell me what is meant by 'consensus'. For example in the link below: https://cburgmer.github.io/json-path-comparison/results/union_with_wildcard_and_number.html
See it as expected result.
ok
Then what does it mean if the consensus is "not supported"?
That's in fact just another consensus and simply means, that most implementations do not support this query.
An example: Let's assume a math problem:
5 + 1 = ?
There are multiple ways to calculate it, but no way is guaranteed to provide the correct result. So let's assume, there are 5 ways to calculate the result:
The first way gives 6 The 2nd way gives 6 The 3rd way gives 5 The 4th way gives 6 The 5th way gives 7
Without knowing, what the expected result is, we assume it's 6, because that's the consensus of all possible ways is 6.
I hope, this answers your question.
However, in this specific case, "Not supported" isn't really a desirable result. That's why we use the result from Proposal A. There's still no guarantee, that this is the result we should expect, but it's pretty likely, that it's result is, what most people would expect, when executing the given query.